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

UiSelect improvements #557

Open
wants to merge 5 commits into
base: next
Choose a base branch
from

Conversation

kilobyte2007
Copy link
Contributor

This is a proposal PR handling an issue I've long had in our project.

  1. UiSelect to emit only the value and not the whole object up. This is more and more relevant considering the way modern apps work where you have a list of options but only store the value in your database, without the label. I know it's a very breaking change but it seems like it would be the correct way forward. Most other UI libraries do it this way and it seems much more logical. UiSelect - Select option by value #285 UISelect is not returning the pure value #270
  2. Added a clear button to UiSelect - allowing it to clear the value (similarly to the way UiAutocomplete works). It can be configured using a prop. I've also added it to the UiDatepicker component as it also didn't have a way of clearing the value out of the box. Also, I've added support for a null value for the UiSelect - this way we can have null values coming from the database and the UiSelect won't turn them into a String automatically. How can we select an empty value? #446 Clearing the selection in UiSelect #406
  3. Added support to providing UiSelect options as an object - just a QOL improvement as very often it's much easier to provide the options like this: `{ 1: 'Sergiu', 2: 'Tom', 3: 'John' }.

We already use all of these in our production apps by linking to a forked branch and it helped me remove so much redundant code so I would really be glad if this landed. Let me know what you think.

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 this pull request may close these issues.

1 participant