mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-25 01:10:40 +01:00
fix(CommandPalette): options priority
This commit is contained in:
@@ -75,13 +75,13 @@ onMounted(() => {
|
|||||||
activateFirstOption()
|
activateFirstOption()
|
||||||
})
|
})
|
||||||
|
|
||||||
const options: ComputedRef<Partial<UseFuseOptions<Command>>> = computed(() => defu({}, {
|
const options: ComputedRef<Partial<UseFuseOptions<Command>>> = computed(() => defu({}, props.options, {
|
||||||
fuseOptions: {
|
fuseOptions: {
|
||||||
keys: ['label']
|
keys: ['label']
|
||||||
},
|
},
|
||||||
resultLimit: 12,
|
resultLimit: 12,
|
||||||
matchAllWhenSearchEmpty: true
|
matchAllWhenSearchEmpty: true
|
||||||
}, props.options))
|
}))
|
||||||
|
|
||||||
const fuse = props.groups.reduce((acc, group) => {
|
const fuse = props.groups.reduce((acc, group) => {
|
||||||
const fuse = useFuse(query, group.commands, defu({}, group.options || {}, options.value))
|
const fuse = useFuse(query, group.commands, defu({}, group.options || {}, options.value))
|
||||||
|
|||||||
Reference in New Issue
Block a user