1
0
Fork 0

feat(shared): Optional ordering for design options and menus

This commit is contained in:
Benjamin Fan 2024-02-12 08:29:04 -08:00
parent bafb33755c
commit a1392cba2e
2 changed files with 23 additions and 11 deletions

View file

@ -199,7 +199,7 @@ export const optionsMenuStructure = (options, settings) => {
const menu = {}
// Fixme: One day we should sort this based on the translation
for (const option of orderBy(sorted, ['menu', 'name'], ['asc'])) {
for (const option of orderBy(sorted, ['sort', 'menu', 'name'], ['asc', 'asc', 'asc'])) {
if (typeof option === 'object') {
const oType = optionType(option)
option.dflt = option.dflt || option[oType]