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

[ListBox] Undefined behaviour when 0 is passed as selection value #846

Closed
bugproof opened this issue Jan 17, 2023 · 1 comment
Closed

[ListBox] Undefined behaviour when 0 is passed as selection value #846

bugproof opened this issue Jan 17, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@bugproof
Copy link

bugproof commented Jan 17, 2023

Current Behavior

This might be expected or not. At least it should be mentioned in the docs. If you try to use enum value it naturally starts from 0 so this might not be expected.

Steps To Reproduce

const storeSingle: Writable<number> = writable(0);

<ListBox selected="{storeSingle}" label="Single Selection">
	<ListBoxItem value={0}>Selection Example 1</ListBoxItem>
	<ListBoxItem value={1}>Selection Example 2</ListBoxItem>
</ListBox>

Anything else?

Personally if #845 is fixed then I wouldn't have this issue.

@endigo9740
Copy link
Contributor

Included this with #845 so I'm closing this out. We'll address both issues at once time so it's simpler if they're in one place. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants