From c64d037a7fb8b6b744ae8c5e730f6803ed658938 Mon Sep 17 00:00:00 2001 From: Ismael Date: Thu, 9 Oct 2025 16:15:08 +0200 Subject: [PATCH] feat(CommandPalette): preserve group order in search results --- .../app/pages/components/command-palette.vue | 6 ++- src/runtime/components/CommandPalette.vue | 27 ++++++++++++++ test/components/CommandPalette.spec.ts | 1 + .../CommandPalette-vue.spec.ts.snap | 37 +++++++++++++++++++ .../__snapshots__/CommandPalette.spec.ts.snap | 37 +++++++++++++++++++ 5 files changed, 107 insertions(+), 1 deletion(-) diff --git a/playgrounds/nuxt/app/pages/components/command-palette.vue b/playgrounds/nuxt/app/pages/components/command-palette.vue index abf3b2916d..b6f441ad0d 100644 --- a/playgrounds/nuxt/app/pages/components/command-palette.vue +++ b/playgrounds/nuxt/app/pages/components/command-palette.vue @@ -11,6 +11,7 @@ const searchTerm = ref('') // const searchTermDebounced = refDebounced(searchTerm, 200) const selected = ref([]) const virtualize = ref(false) +const preserveGroupOrder = ref(false) const { data: users, status } = await useFetch('https://jsonplaceholder.typicode.com/users', { // params: { q: searchTermDebounced }, @@ -155,6 +156,7 @@ defineShortcuts({