-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filtering breaks on Svelte-5 #92
Comments
I managed to make it work for time being with wrapping {#key items}
<Command.Group>
{#each items as item}
....
{/each}
</Command.Group>
{/key} |
Seems like it's being worked on here (just to add the relation). |
Started to break here: svelte@5.0.0-next.167 |
Workaround (https://github.com/sveltejs/svelte/releases/tag/svelte%405.0.0-next.220): Recreate <script>
let search = $state('')
</script>
<Command.Root>
<Command.Input placeholder="Search framework..." bind:value={search} />
{#key search}
<Command.Group>
{#each frameworks as framework}
<Command.Item>
...
</Command.Item>
{/each}
</Command.Group>
{/key}
</Command.Root> |
Can't debug anything related to Svelte 5 when the prod version of the library is Svelte 4. These issues will be addressed once the Svelte 5 version of this project is released! Thank you! |
Just to add some additional context, we're pretty confident this PR specifically broke Per sveltejs/svelte#10359 (comment) it doesn't seem like the backward compatibility applies to this library I'm working on the Svelte 5 version, but running into similar issues (duplicate items). Hopefully, I will be able to resolve them with help from the Svelte team 😃 |
Duplicate names after typing in letters and backspacing is resolved with @WP-David's |
If you're using Svelte 5, it's recommended to use the |
This may be related to issue. #89
When upgrading to svelte-5 filtering breaks on the command component in shadcn-svelte. Docs mention to report issues here.
Stackblitz reproducing issue:
https://stackblitz.com/edit/stackblitz-starters-whbv8w?file=package.json
Steps to reproduce:
There is a delay when running the dev environment in stackblitz, not sure why, so you may have to refresh the page a bunch before the filter count shows properly at the top of the command list
The filter count of the cmdk state is shown at the top of the list
Typing in the input, you can see the results are filtered on the store, but some of the command items that should be filtered out still show in the command list
They are not selectable, and can't be navigated to with the keyboard, but still display
DOwn grade to svelte 4 (npm i svlete@latest)
Everything works as expected
The text was updated successfully, but these errors were encountered: