1
0
Fork 0
mirror of synced 2024-10-06 13:04:36 +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 7b4c842eb3
commit ae3bd8cc17

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
}),
})
}