tbleckert / react-select-search

⚡️ Lightweight select component for React
https://react-select-search.com
MIT License
676 stars 147 forks source link

fix: Issue when searching and pressing the enter key #85

Closed Russ93 closed 4 years ago

Russ93 commented 4 years ago

When pressing the enter key on a search for causes and error to occur.

It also happens in this example. https://react-select-search.com/?path=/story/multiple-select--search

TypeError: Cannot read property 'value' of undefined
    at https://react-select-search.com/main.2a55b59e5151045cfaee.bundle.js:1:99508
    at vh (https://react-select-search.com/vendors~main.2a55b59e5151045cfaee.bundle.js:2:621395)
    at wh (https://react-select-search.com/vendors~main.2a55b59e5151045cfaee.bundle.js:2:622161)
    at Object.useState (https://react-select-search.com/vendors~main.2a55b59e5151045cfaee.bundle.js:2:626190)
    at exports.useState (https://react-select-search.com/vendors~main.2a55b59e5151045cfaee.bundle.js:2:562361)
    at useSelectSearch (https://react-select-search.com/main.2a55b59e5151045cfaee.bundle.js:1:97645)
    at https://react-select-search.com/main.2a55b59e5151045cfaee.bundle.js:1:82806
    at oh (https://react-select-search.com/vendors~main.2a55b59e5151045cfaee.bundle.js:2:620601)
    at Zh (https://react-select-search.com/vendors~main.2a55b59e5151045cfaee.bundle.js:2:628499)
    at Rj (https://react-select-search.com/vendors~main.2a55b59e5151045cfaee.bundle.js:2:668795)

Thank you for this tool it is very helpful!

vercel[bot] commented 4 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/5i1dns2n1 ✅ Preview: https://react-select-search-git-fork-russ93-fix-enteronsearcherror.tbleckert.now.sh

ra-stevenli commented 4 years ago

I'm using version 2.0.3 of the react-select-search library and am still seeing this issue.

tbleckert commented 4 years ago

@ra-stevenli Thanks! This bugfix has not been published yet so it's only available in the master branch, I haven't had time to publish it unfortunately. Will do it this week.