[EC-1025] fix: sort on each data field separately (#4609)

This commit is contained in:
Andreas Coroiu 2023-02-06 09:46:27 +01:00 committed by GitHub
parent e62d0b2987
commit 82b273651f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 6 deletions

View File

@ -285,12 +285,11 @@ export class AccessSelectorComponent implements ControlValueAccessor, OnInit, On
} }
private _itemComparator(a: AccessItemView, b: AccessItemView) { private _itemComparator(a: AccessItemView, b: AccessItemView) {
if (a.type != b.type) { return (
return a.type - b.type; a.type - b.type ||
} this.i18nService.collator.compare(a.listName, b.listName) ||
return this.i18nService.collator.compare( this.i18nService.collator.compare(a.labelName, b.labelName) ||
a.listName + a.labelName + a.readonly, Number(b.readonly) - Number(a.readonly)
b.listName + b.labelName + b.readonly
); );
} }
} }