mirror of
https://github.com/bitwarden/browser
synced 2024-12-27 10:23:48 +01:00
[EC-1025] fix: sort on each data field separately (#4609)
This commit is contained in:
parent
e62d0b2987
commit
82b273651f
@ -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)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user