Skip to content

Commit

Permalink
fix(CommandPalette): keep ignoreFilter groups at their place (#2833)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac authored Dec 9, 2024
1 parent 6636543 commit 3b9ca22
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/runtime/components/CommandPalette.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,15 @@ const groups = computed(() => {
return getGroupWithItems(group, items)
}).filter(group => !!group)
const nonFuseGroups = props.groups?.filter(group => group.ignoreFilter && group.items?.length).map((group) => {
return getGroupWithItems(group, group.items || [])
}) || []
return [
...fuseGroups,
...nonFuseGroups
]
const nonFuseGroups = props.groups
?.map((group, index) => ({ ...group, index }))
?.filter(group => group.ignoreFilter && group.items?.length)
?.map(group => ({ ...getGroupWithItems(group, group.items || []), index: group.index })) || []
return nonFuseGroups.reduce((acc, group) => {
acc.splice(group.index, 0, group)
return acc
}, [...fuseGroups])
})
</script>

Expand Down

0 comments on commit 3b9ca22

Please sign in to comment.