Closed davidangel closed 3 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/tbleckert/react-select-search/2gs8izvhm
✅ Preview: https://react-select-search-git-fork-davidangel-master.tbleckert.vercel.app
Upon further testing, I'm not convinced my current changes actually fix anything.
It looks like there's no ID making it to this line, and thus no selection taking place. Is one expected to provide the value
attribute on the button?
@davidangel Sorry for the delay and thanks for the PR. From what I can tell, your fix seems to fix the issue.
Regarding your comment. Yes, a value is needed on the option element. It is included in the DOM props sent to the render callback (https://github.com/tbleckert/react-select-search/blob/master/src/Components/Option.jsx#L20).
I think the problems came with the introduction of number support for values. In the linked file you can see that I set _id
instead of value
in your commit, that gives a hint about the problem.
I'll merge this in and prepare it for testing and a patch release.
Addresses #107 (and I believe #92 - unsure why this didn't get merged?)