diff --git a/src/lib/components/ui/navbar/commands/Commands.svelte b/src/lib/components/ui/navbar/commands/Commands.svelte index c353be6b..103e7a47 100644 --- a/src/lib/components/ui/navbar/commands/Commands.svelte +++ b/src/lib/components/ui/navbar/commands/Commands.svelte @@ -21,6 +21,16 @@ let { open = $bindable(false), groups = $bindable([]) }: Props = $props() + $effect(() => { + groups = getGroups( + $resumables, + profile.data, + profileData.profiles, + $themeData, + page.data.contextual?.actions, + ) + }) + let search = $state('') let container: HTMLElement | undefined = $state() const dispatch = createEventDispatcher() @@ -226,18 +236,11 @@ $effect(() => { if (open) search = '' }) - $effect(() => { - groups = getGroups( - $resumables, - profile.data, - profileData.profiles, - $themeData, - page.data.contextual?.actions, - ) - }) + let flattenedActions = $derived( filteredGroups.flatMap((group) => group.actions), ) + $effect(() => { debouncedSearch(search) }) @@ -245,8 +248,14 @@ - -
+ +
{#if breadcrumbs.length > 0}