mskocik / svelecte

Flexible autocomplete/select component written in Svelte,
https://svelecte.vercel.app
MIT License
469 stars 42 forks source link

Cannot read properties of undefined - reading `$disabled` #171

Closed FluffyDiscord closed 1 year ago

FluffyDiscord commented 1 year ago

Getting randomly the following error when creatable is enabled

image the Dropdown.svelte you are using image

Any tips why this might happen?

mskocik commented 1 year ago

It must be related to the your app-specific code. The error is in place, where it expects object, but it is null or undefined. It means you have option list with invalid options. That's my guess 🤔

FluffyDiscord commented 1 year ago

Only shows when built. I did not add the created option to the options property so the select tried to access item on non existing index. After manually updating on creating the options prop array, it now works as intended.