janosh / svelte-multiselect

Keyboard-friendly, accessible and highly customizable multi-select component
https://multiselect.janosh.dev
MIT License
282 stars 36 forks source link

Svelte 5 support? #281

Closed ndom91 closed 1 week ago

ndom91 commented 9 months ago

Repro

image

Additional context

Are there any plans for Svelte 5 updates yet? I know its early, but yeah figured I'd ask :blush:

janosh commented 9 months ago

@ndom91 Svelte v5 support is definitely coming!

I remember there was a reason for having ondrop="return false" over ondrop={() => false} but maybe that's no longer the case with Svelte 5. If so, easy fix. The main blocker right now is mdsvexamples used extensively in the docs. Just upgraded to 5.0.0-next.35 and still get vite compilation errors:

    at option (/Users/janosh/dev/svelte-multiselect/src/site/Examples.svx___mdsvexample___2.svelte:37:49)
    at Module.slot (/Users/janosh/dev/svelte-multiselect/node_modules/.pnpm/svelte@5.0.0-next.35/node_modules/svelte/src/internal/server/index.js:440:3)
    at $$render_inner (/Users/janosh/dev/svelte-multiselect/src/lib/MultiSelect.svelte:762:27)
    at MultiSelect (/Users/janosh/dev/svelte-multiselect/src/lib/MultiSelect.svelte:885:3)
    at Examples_svx___mdsvexample___2 (/Users/janosh/dev/svelte-multiselect/src/site/Examples.svx___mdsvexample___2.svelte:26:35)
    at /Users/janosh/dev/svelte-multiselect/src/site/Examples.svx:189:48
    at Module.slot (/Users/janosh/dev/svelte-multiselect/node_modules/.pnpm/svelte@5.0.0-next.35/node_modules/svelte/src/internal/server/index.js:437:4)
    at example (/Users/janosh/dev/svelte-multiselect/src/site/Examples.svx:184:11)
    at Module.slot (/Users/janosh/dev/svelte-multiselect/node_modules/.pnpm/svelte@5.0.0-next.35/node_modules/svelte/src/internal/server/index.js:440:3)
    at CodeExample (/Users/janosh/dev/svelte-multiselect/node_modules/.pnpm/svelte-zoo@0.4.9_vite@5.0.11/node_modules/svelte-zoo/dist/CodeExample.svelte:70:25)
11:43:02 AM [vite] warning: Example src not found for /Users/janosh/dev/svelte-multiselect/___mdsvexample___0.svelte

Feel free to chime in at https://github.com/mattjennings/mdsvexamples/issues/30 if you think now's the time to address these.

rchavezj commented 2 weeks ago

Svelte 5 just came out :) I hope you get the chance to update this library soon