mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-01 20:57:57 +01:00
fix(InputMenu/SelectMenu): empty search results
This commit is contained in:
@@ -269,7 +269,7 @@ const filteredGroups = computed(() => {
|
|||||||
|
|
||||||
return fields.some(field => contains(get(item, field), searchTerm.value))
|
return fields.some(field => contains(get(item, field), searchTerm.value))
|
||||||
})).filter(group => group.filter(item =>
|
})).filter(group => group.filter(item =>
|
||||||
isInputItem(item) && (!item.type || !['label', 'separator'].includes(item.type))
|
!isInputItem(item) || (!item.type || !['label', 'separator'].includes(item.type))
|
||||||
).length > 0)
|
).length > 0)
|
||||||
})
|
})
|
||||||
const filteredItems = computed(() => filteredGroups.value.flatMap(group => group))
|
const filteredItems = computed(() => filteredGroups.value.flatMap(group => group))
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ const filteredGroups = computed(() => {
|
|||||||
|
|
||||||
return fields.some(field => contains(get(item, field), searchTerm.value))
|
return fields.some(field => contains(get(item, field), searchTerm.value))
|
||||||
})).filter(group => group.filter(item =>
|
})).filter(group => group.filter(item =>
|
||||||
isSelectItem(item) && (!item.type || !['label', 'separator'].includes(item.type))
|
!isSelectItem(item) || (!item.type || !['label', 'separator'].includes(item.type))
|
||||||
).length > 0)
|
).length > 0)
|
||||||
})
|
})
|
||||||
const filteredItems = computed(() => filteredGroups.value.flatMap(group => group))
|
const filteredItems = computed(() => filteredGroups.value.flatMap(group => group))
|
||||||
|
|||||||
Reference in New Issue
Block a user