question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'filter' of undefined when pressing Enter Key

See original GitHub issue

Hi guys it seems like there is a bug in version 1.1.0. It can be reproduced by typing a few characters and then pressing Enter key. I am using the following code to test it:

        <Creatable
          multi={true}
          value={this.state.value}
          promptTextCreator={text =>
             `Add ${text} To List` }
          placeholder={'Enter Your Answers'}
          onBlurResetsInput={true}
        />   

This is the error I get:

Uncaught TypeError: Cannot read property 'filter' of undefined at isOptionUnique (bundle.js:30499) at CreatableSelect.isOptionUnique (bundle.js:30376) at CreatableSelect.createNewOption (bundle.js:30304) at CreatableSelect.onInputKeyDown (bundle.js:30419) at Select.handleKeyDown (bundle.js:29113) at HTMLUnknownElement.callCallback (bundle.js:7119) at Object.invokeGuardedCallbackDev (bundle.js:7158) at Object.invokeGuardedCallback (bundle.js:7015) at Object.invokeGuardedCallbackAndCatchFirstError (bundle.js:7029) at executeDispatch (bundle.js:7413) at executeDispatchesInOrder (bundle.js:7435) at executeDispatchesAndRelease (bundle.js:7533) at executeDispatchesAndReleaseTopLevel (bundle.js:7544) at Array.forEach (<anonymous>) at forEachAccumulated (bundle.js:7512) at processEventQueue (bundle.js:7689) at runEventQueueInBatch (bundle.js:10184) at handleTopLevel (bundle.js:10193) at handleTopLevelImpl (bundle.js:9924) at batchedUpdates (bundle.js:17659) at batchedUpdates (bundle.js:8907) at dispatchEvent (bundle.js:9998) isOptionUnique @ bundle.js:30499 isOptionUnique @ bundle.js:30376 createNewOption @ bundle.js:30304 onInputKeyDown @ bundle.js:30419 handleKeyDown @ bundle.js:29113 callCallback @ bundle.js:7119 invokeGuardedCallbackDev @ bundle.js:7158 invokeGuardedCallback @ bundle.js:7015 invokeGuardedCallbackAndCatchFirstError @ bundle.js:7029 executeDispatch @ bundle.js:7413 executeDispatchesInOrder @ bundle.js:7435 executeDispatchesAndRelease @ bundle.js:7533 executeDispatchesAndReleaseTopLevel @ bundle.js:7544 forEachAccumulated @ bundle.js:7512 processEventQueue @ bundle.js:7689 runEventQueueInBatch @ bundle.js:10184 handleTopLevel @ bundle.js:10193 handleTopLevelImpl @ bundle.js:9924 batchedUpdates @ bundle.js:17659 batchedUpdates @ bundle.js:8907 dispatchEvent @ bundle.js:9998

Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ayozebarreracommented, Mar 20, 2018

Why is still this open? I updated to ^1.2.1 and fixed!

0reactions
bladeycommented, May 27, 2020

Hello -

In an effort to sustain the react-select project going forward, we’re closing old issues / pull requests.

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our limited efforts to maintain the latest version.

If you feel this issue / pull request is still relevant and you’d like us to review it, please leave a comment and we’ll do our best to get back to you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property '$filter' of undefined
Basically, you aren't using $filter, and you're trying to filter on a type that does not have that method within its prototype. If...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError: Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
cannot read properties of undefined (reading 'filter') in react js
StackOverflow ; filteredUsers = state.users.filter((user) => { return ; [state, setState] = useState({ · //or a initial value of array of users. ;...
Read more >
TypeError: Cannot read property 'filter' of undefined - Laracasts
TypeError: Cannot read property 'filter' of undefined. Copy Code return this.$store.state.orders.filter(m => m.paper_status === 'complete'); },.
Read more >
Cannot read property 'filter' of undefined when filtering sap.m ...
Hi, I have an input with both value help and suggestion items. I'm applying filters when the suggest event triggers and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found