diff --git a/src/runtime/components/navigation/CommandPalette.vue b/src/runtime/components/navigation/CommandPalette.vue index eb7e9d70..8b4e7493 100644 --- a/src/runtime/components/navigation/CommandPalette.vue +++ b/src/runtime/components/navigation/CommandPalette.vue @@ -94,6 +94,10 @@ const props = defineProps({ options: { type: Object as PropType>>, default: () => ({}) + }, + autoselect: { + type: Boolean, + default: true } }) @@ -103,7 +107,9 @@ const query = ref('') const comboboxInput = ref>() onMounted(() => { - activateFirstOption() + if (props.autoselect) { + activateFirstOption() + } }) const options: ComputedRef>> = computed(() => defu({}, props.options, {