1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-29 04:17:41 +02:00

[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

View File

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