From 9a0fa63a5c1f8fa6bb4ce21fd77de55c66aaacbf Mon Sep 17 00:00:00 2001
From: "John Molakvoæ (skjnldsv)" <skjnldsv@protonmail.com>
Date: Tue, 14 Jan 2020 15:40:42 +0100
Subject: Do not save on update, use submit
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
---
 apps/files_sharing/src/components/SharingEntry.vue | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

(limited to 'apps/files_sharing/src/components/SharingEntry.vue')

diff --git a/apps/files_sharing/src/components/SharingEntry.vue b/apps/files_sharing/src/components/SharingEntry.vue
index ff6e8bcae77..ee944a76258 100644
--- a/apps/files_sharing/src/components/SharingEntry.vue
+++ b/apps/files_sharing/src/components/SharingEntry.vue
@@ -29,7 +29,10 @@
 		<div v-tooltip.auto="tooltip" class="sharing-entry__desc">
 			<h5>{{ title }}</h5>
 		</div>
-		<Actions menu-align="right" class="sharing-entry__actions">
+		<Actions
+			menu-align="right"
+			class="sharing-entry__actions"
+			@close="onMenuClose">
 			<template v-if="share.canEdit">
 				<!-- edit permission -->
 				<ActionCheckbox
@@ -114,9 +117,10 @@
 						}"
 						:class="{ error: errors.note}"
 						:disabled="saving"
-						:value.sync="share.note"
+						:value="share.newNote || share.note"
 						icon="icon-edit"
-						@update:value="debounceQueueUpdate('note')" />
+						@update:value="onNoteChange"
+						@submit="onNoteSubmit" />
 				</template>
 			</template>
 
@@ -303,6 +307,13 @@ export default {
 			this.share.permissions = permissions
 			this.queueUpdate('permissions')
 		},
+
+		/**
+		 * Save potential changed data on menu close
+		 */
+		onMenuClose() {
+			this.onNoteSubmit()
+		},
 	},
 }
 </script>
-- 
cgit v1.2.3

