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

[Feature]: Treat null as an empty value for Select #880

Closed
1 of 2 tasks
kilobyte2007 opened this issue Apr 26, 2024 · 1 comment · Fixed by #912
Closed
1 of 2 tasks

[Feature]: Treat null as an empty value for Select #880

kilobyte2007 opened this issue Apr 26, 2024 · 1 comment · Fixed by #912
Assignees

Comments

@kilobyte2007
Copy link

kilobyte2007 commented Apr 26, 2024

Describe the feature

From what I see here, for the Select component - only undefined and '' is treated as an empty value - see here: https://github.com/radix-vue/radix-vue/blob/main/packages/radix-vue/src/Select/utils.ts

Is there any reason why null is not treated the same way? If it's a design decision - I think it would make sense to have a way to configure this somehow.

The same situation is present in ToggleGroup, Calendar, and some other components where null is not accepted as a type while it's a pretty common situation where some values can come as null from a backend or API.

Additional information

  • I intend to submit a PR for this feature.
  • I have already implemented and/or tested this feature.
@zernonia
Copy link
Member

Thanks for the issue @kilobyte2007 .. I think it make sense to consider null as nullish value and show the placeholder here

@zernonia zernonia self-assigned this May 13, 2024
@zernonia zernonia linked a pull request May 13, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants