From 76ffbf4cf355f3cb36a9d896a4ed6d2a874fe780 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Sun, 17 Jul 2022 17:39:44 +0200 Subject: [PATCH] fix(CommandPalette): options priority --- src/runtime/components/navigation/CommandPalette.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/components/navigation/CommandPalette.vue b/src/runtime/components/navigation/CommandPalette.vue index 117e905d..f8ddf492 100644 --- a/src/runtime/components/navigation/CommandPalette.vue +++ b/src/runtime/components/navigation/CommandPalette.vue @@ -75,13 +75,13 @@ onMounted(() => { activateFirstOption() }) -const options: ComputedRef>> = computed(() => defu({}, { +const options: ComputedRef>> = computed(() => defu({}, props.options, { fuseOptions: { keys: ['label'] }, resultLimit: 12, matchAllWhenSearchEmpty: true -}, props.options)) +})) const fuse = props.groups.reduce((acc, group) => { const fuse = useFuse(query, group.commands, defu({}, group.options || {}, options.value))