backport of commit 67e5b084a1ea525cc5a2b93c2f0ed890d1af0ce3 (#18052)
This pull request was automerged via backport-assistant
This commit is contained in:
parent
04a95ef5c7
commit
51b8993180
|
@ -0,0 +1,3 @@
|
|||
```release-note:improvement
|
||||
ui: sort variable key/values alphabetically by key when editing
|
||||
```
|
|
@ -21,12 +21,14 @@ export default class VariableSerializer extends ApplicationSerializer {
|
|||
if (!hash.Items) {
|
||||
hash.Items = { '': '' };
|
||||
}
|
||||
hash.KeyValues = Object.entries(hash.Items).map(([key, value]) => {
|
||||
return {
|
||||
key,
|
||||
value,
|
||||
};
|
||||
});
|
||||
hash.KeyValues = Object.entries(hash.Items)
|
||||
.map(([key, value]) => {
|
||||
return {
|
||||
key,
|
||||
value,
|
||||
};
|
||||
})
|
||||
.sort((a, b) => a.key.localeCompare(b.key));
|
||||
delete hash.Items;
|
||||
return super.normalizeFindRecordResponse(
|
||||
store,
|
||||
|
|
Loading…
Reference in New Issue