fix(webui): prevent duplicate name in sort/filter selectors and add toolbar quick actions (#523)

This commit is contained in:
Yiling-J
2026-11-07 18:35:49 +08:00
committed by GitHub
parent 0359733637
commit 403e209359
7 changed files with 424 additions and 2 deletions
@@ -33,7 +33,12 @@ export function SortControl({ fields, sort, onSortChange, disabled }: SortContro
id: f.id!,
label: f.config?.name || f.description || m.unknown(),
}))
return [...sys, ...custom]
const seen = new Set<string>()
return [...sys, ...custom].filter((f) => {
if (!f.id || seen.has(f.id)) return false
seen.add(f.id)
return true
})
}, [fields])
// Default to Custom if no sort selected