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]: Allow explicit override of default values for select items when no placeholder is required #1489

Open
2 tasks
GalacticHypernova opened this issue Dec 9, 2024 · 0 comments

Comments

@GalacticHypernova
Copy link

Describe the feature

Currently, an error is thrown when a select item has an empty value stating it can't be empty because it needs to be able to be set to empty to show the placeholder. However, in selects that don't need placeholders and don't need it to actually have values, this complicates things and requires more logic just to maintain the default behavior.

Example: if an app has a filtering system (to narrow down results) that use a Select to choose the field to filter by, the default, empty value means there is no specific filter to be applied, and therefore it should stay empty to not get sent to the server for processing.

This means the empty value serves a purpose, and is not just a mistake that will remove the placeholder.

For such cases, it would be beneficial to have a way to explicitly override the value so the error won't get thrown and the Select would keep working as intended.

Additional information

  • I intend to submit a PR for this feature.
  • I have already implemented and/or tested this feature.
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

No branches or pull requests

1 participant