tbleckert / react-select-search

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

TypeError: Cannot read property 'value' of undefined #86

Closed Russ93 closed 4 years ago

Russ93 commented 4 years ago

Issue occurs when you press enter on the search field

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)

PR https://github.com/tbleckert/react-select-search/pull/85 should fix this issue

ra-stevenli commented 4 years ago

Following the PR link shows it as being merged into master but I still see this issue locally when I try to use the SelectSearch in my project. I don't think the latest version (2.0.3) has this change.

tbleckert commented 4 years ago

@ra-stevenli @Russ93 I've published a patch (2.0.4) that includes the fix from the PR

ra-stevenli commented 4 years ago

@tbleckert thank you!