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
Form.Select not displaying two distinct text fields if their value fields are identical. #4420
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
@layershifter in the dropdown handleClick function, it is comparing the current value and the new value, instead shouldn't it be comparing they keys instead as the keys will always be unique? this may solve the issue. could you guide please `
` |
If two or more options in the options prop have the same value in their respective value fields, the Select component only highlights one option for all such cases. For example,
const options = [{key:1, text: "opt", value: "opt546"}, {key:2, text: "newOpt", value: "opt546"}, {key:3, text: "diffOpt", value: "opt54"}];
In here, whether we choose "opt" or "newOpt", the Select component only displays "opt" in the input box. Only if the value fields are unique, is it considering the text fields separately.
The text was updated successfully, but these errors were encountered: