[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