mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 15:01:46 +01:00
fix(CommandPalette): fix groups computed
This commit is contained in:
@@ -124,7 +124,7 @@ const fuse = props.groups.reduce((acc, group) => {
|
||||
const groups = computed(() => props.groups.map((group) => {
|
||||
return {
|
||||
...group,
|
||||
commands: fuse[group.key].results.value.map(result => group.commands.find(command => command.id === result.item.id)).slice(0, group.options?.resultLimit || options.value.resultLimit)
|
||||
commands: fuse[group.key].results.value.map(result => group.commands.find(command => command.id === result.item.id)).filter(Boolean).slice(0, group.options?.resultLimit || options.value.resultLimit)
|
||||
}
|
||||
}).filter(group => group.commands.length))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user