Skip to content

Commit

Permalink
fix: move key up
Browse files Browse the repository at this point in the history
  • Loading branch information
Not-Jayden committed Nov 18, 2023
1 parent 9766a7a commit 685467c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/lib/cmdk/components/CommandList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,16 @@
};
</script>

{#key $state.search === ''}
{#if asChild}
{#if asChild}
{#key $state.search === ''}
<slot {list} {sizer} />
{:else}
<div {...listAttrs} bind:this={el} {...$$restProps}>
<div {...sizerAttrs} use:sizerAction>
{/key}
{:else}
<div {...listAttrs} bind:this={el} {...$$restProps}>
<div {...sizerAttrs} use:sizerAction>
{#key $state.search === ''}
<slot />
</div>
{/key}
</div>
{/if}
{/key}
</div>
{/if}

0 comments on commit 685467c

Please sign in to comment.