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

Fix async search clicks #108

Merged
merged 10 commits into from
Sep 24, 2020
Merged

Fix async search clicks #108

merged 10 commits into from
Sep 24, 2020

Conversation

davidangel
Copy link
Contributor

Addresses #107 (and I believe #92 - unsure why this didn't get merged?)

@vercel
Copy link

vercel bot commented Aug 28, 2020

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

@davidangel
Copy link
Contributor Author

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?

# Conflicts:
#	src/useSelect.js
@tbleckert
Copy link
Owner

@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.

@tbleckert tbleckert merged commit 0221dcb into tbleckert:master Sep 24, 2020
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.

3 participants