Sort the attributes and attribute groups by name for now
This commit is contained in:
parent
dbaac0cf29
commit
0c694d2166
1 changed files with 3 additions and 2 deletions
|
|
@ -312,7 +312,8 @@ export class PlayerSheet extends
|
|||
ctx.tabActive = this.tabGroups.primary === `attributes`;
|
||||
|
||||
const groups = new Map();
|
||||
const attrs = this.actor.itemTypes.attribute ?? [];
|
||||
const attrs = (this.actor.itemTypes.attribute ?? [])
|
||||
.toSorted((a, b) => a.name.localeCompare(b.name));
|
||||
for (const attr of attrs) {
|
||||
if (attr.system.aboveTheFold) { continue };
|
||||
|
||||
|
|
@ -328,7 +329,7 @@ export class PlayerSheet extends
|
|||
|
||||
group.attrs.push(attr);
|
||||
};
|
||||
ctx.attrGroups = [...groups.values()];
|
||||
ctx.attrGroups = [...groups.values()].toSorted((a, b) => a.name.localeCompare(b.name));
|
||||
};
|
||||
|
||||
async _prepareTabList(ctx) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue