aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r--src/client/views/PropertiesView.tsx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index ab3864849..825a802cd 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -413,6 +413,15 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
};
/**
+ * Sorting algorithm to sort groups.
+ */
+ sortGroups = (group1: Doc, group2: Doc) => {
+ const g1 = StrCast(group1.title);
+ const g2 = StrCast(group2.title);
+ return g1 > g2 ? -1 : g1 === g2 ? 0 : 1;
+ };
+
+ /**
* @returns the sharing and permissions panel.
*/
@computed get sharingTable() {
@@ -459,6 +468,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
// adds groups
const groupTableEntries: JSX.Element[] = [];
const groupList = GroupManager.Instance?.allGroups || [];
+ groupList.sort(this.sortGroups)
groupList.map(group => {
if (group.title != 'Public' && this.selectedDoc) {
const groupKey = 'acl-' + normalizeEmail(StrCast(group.title));