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

next: Task example Select should have allowDeselect={false} #1401

Closed
joleeee opened this issue Oct 30, 2024 · 4 comments
Closed

next: Task example Select should have allowDeselect={false} #1401

joleeee opened this issue Oct 30, 2024 · 4 comments
Labels
type: documentation A change or addition to the documentation

Comments

@joleeee
Copy link

joleeee commented Oct 30, 2024

Describe the bug

If you pick the start value from a Select it will the first time do a onValueChange returning "", but it only seems to do so if the Select.Item's value is a stringified integer, e.g. 12 but not a12.

My observations may not be correct but you can see it yourselves at https://next.shadcn-svelte.com/examples/tasks

rec.mp4

Reproduction

Go to https://next.shadcn-svelte.com/examples/tasks, click Rows per page = 10

Logs

No response

System Info

It happens on the official website aswell

Severity

blocking an upgrade

@huntabyte
Copy link
Owner

That is the correct value (an empty string) when you select it. The issue is this specific select in the example should have allowDeselect set to false as you shouldn't be able to deselect an option altogether.

@huntabyte huntabyte added the type: documentation A change or addition to the documentation label Oct 30, 2024
@huntabyte huntabyte changed the title next: Select onValueChange is "" when picking the current value next: Task example Select should have allowDeselect={false} Oct 30, 2024
@joleeee
Copy link
Author

joleeee commented Oct 30, 2024

Makes sense! I discovered it through the data table example, so it's also an issue there

@huntabyte
Copy link
Owner

Which Select in that example is causing an issue @joleeee ?

@joleeee
Copy link
Author

joleeee commented Oct 30, 2024

My bad, I misremembered. It must've been from the .svelte files I found for the task example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A change or addition to the documentation
Projects
None yet
Development

No branches or pull requests

2 participants