1
0
Fork 0
mirror of synced 2024-09-29 08:41:16 +13:00

Sort plugins alphabetically in new component panel

This commit is contained in:
Andrew Kingston 2022-09-07 13:37:45 +01:00
parent 142c277fab
commit 67c21f7808

View file

@ -58,10 +58,14 @@
enrichedStructure.push({
name: "Plugins",
isCategory: true,
children: customComponents.map(x => ({
...definitions[x],
name: definitions[x].friendlyName || definitions[x].name,
})),
children: customComponents
.map(x => ({
...definitions[x],
name: definitions[x].friendlyName || definitions[x].name,
}))
.sort((a, b) => {
return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1
}),
})
}