You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the time when we use a creatable InputPicker, we don't want user to create a new option with duplicated name with existing entries.
For now InputPicker hides "Create option" action when the search keyword matches any entry's [valueKey], which is not ideal IMO. Instead we tend to avoid duplicated [labelKey] most of the time.
What problem does this feature solve?
Most of the time when we use a creatable InputPicker, we don't want user to create a new option with duplicated name with existing entries.
For now InputPicker hides "Create option" action when the search keyword matches any entry's
[valueKey]
, which is not ideal IMO. Instead we tend to avoid duplicated[labelKey]
most of the time.rsuite/src/InputPicker/InputPicker.tsx
Lines 671 to 673 in fafef7c
What does the proposed API look like?
Provide a new prop for users to specify whether to display "Create option" action with given keyword. Something like:
Usage example:
The text was updated successfully, but these errors were encountered: