Skip to content
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

Combobox autocomplete breaks in Svelte 5. #1270

Closed
memestageceo opened this issue Sep 15, 2024 · 2 comments
Closed

Combobox autocomplete breaks in Svelte 5. #1270

memestageceo opened this issue Sep 15, 2024 · 2 comments

Comments

@memestageceo
Copy link

Describe the bug

Shadcn-svelte Combobox works in Svelte 4, but doesn't in Svelte 5. Tried with both, the code is same in both, the only different is svelte version.

I've created a repo for the same. The svelte 4 works well, svelte 5 fails - keeps adding new items when trying to filter lists

image

Reproduction

Here's a repo. The svelte 4 version works. Svelte 5 fails - with both svelte 4 and svelte 5 syntax.

https://github.com/memestageceo/combobox-4v5.git

Logs

no messages in console.

System Info

Windows 11. Browsers: MSEdge, Chrome, Zen

Severity

blocking an upgrade

@Egnus
Copy link

Egnus commented Sep 17, 2024

This seems to be happening directly on the dependency used for the combobox cmdk-sv
from this link: huntabyte/cmdk-sv#92
you can find a workaround:

<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>

@huntabyte
Copy link
Owner

We're not addressing Svelte 5 issues until it is out of RC. We cannot control things that Svelte 5 breaks unfortunately.

@huntabyte huntabyte closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants