From 17d8170693f0bbb0d4e1c8ae397381b873f4dcd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Tue, 19 Nov 2019 08:40:12 +0100 Subject: [PATCH] Sort users and groups first in sharing input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- apps/files_sharing/src/components/SharingInput.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue index df222eafe0ce9..c80bb02c6bcf6 100644 --- a/apps/files_sharing/src/components/SharingInput.vue +++ b/apps/files_sharing/src/components/SharingInput.vue @@ -207,8 +207,12 @@ export default { // remove invalid data and format to user-select layout const exactSuggestions = this.filterOutExistingShares(rawExactSuggestions) .map(share => this.formatForMultiselect(share)) + // sort by type so we can get user&groups first... + .sort((a, b) => a.shareType - b.shareType) const suggestions = this.filterOutExistingShares(rawSuggestions) .map(share => this.formatForMultiselect(share)) + // sort by type so we can get user&groups first... + .sort((a, b) => a.shareType - b.shareType) // lookup clickable entry const lookupEntry = []