mirror of
https://github.com/Powerful-517/yys-editor.git
synced 2026-03-05 15:05:27 +00:00
refactor(selector): simplify presets with data-driven groups
This commit is contained in:
@@ -86,6 +86,8 @@ const filteredItems = (group: GroupConfig) => {
|
||||
if (group.name !== 'ALL') {
|
||||
if (group.filter) {
|
||||
items = items.filter(group.filter)
|
||||
} else if (!props.config.groupField) {
|
||||
items = []
|
||||
} else {
|
||||
items = items.filter(item =>
|
||||
item[props.config.groupField]?.toLowerCase() === group.name.toLowerCase()
|
||||
|
||||
Reference in New Issue
Block a user