chore(CommandPalette): improve component

This commit is contained in:
Benjamin Canac
2022-07-18 14:31:23 +02:00
parent 76ffbf4cf3
commit 9e0edc27ab
3 changed files with 31 additions and 20 deletions

View File

@@ -91,8 +91,7 @@ const fuse = props.groups.reduce((acc, group) => {
const groups = computed(() => props.groups.map((group) => {
return {
key: group.key,
label: group.label,
...group,
commands: fuse[group.key].results.value.map(result => result.item).slice(0, group.options?.resultLimit || options.value.resultLimit)
}
}).filter(group => group.commands.length))