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

Select component requires customValue prop #102

Open
edrpls opened this issue Feb 3, 2021 · 1 comment
Open

Select component requires customValue prop #102

edrpls opened this issue Feb 3, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@edrpls
Copy link

edrpls commented Feb 3, 2021

According to the documentation, the customValue prop on the Select component should be optional and used only for customization. However, it is required to set it, or React will complain about elements in an array without a key prop.

The component needs something like:

const valueKey = customValue || 'value';
/* ... */
 <option key={o[valueKey]} value={o[valueKey]}>
@edrpls edrpls added the bug Something isn't working label Feb 3, 2021
@edrpls edrpls self-assigned this Feb 28, 2021
@edrpls
Copy link
Author

edrpls commented Feb 28, 2021

This is fixed on feature/improved-gumdrops, possibly to be released as 2.0.0 in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant