alsoscotland / react-super-select

MIT License
95 stars 33 forks source link

Runtime Error when selecting an element with the Enter Button #158

Closed Chnoch closed 6 years ago

Chnoch commented 6 years ago

Hi.

I'm currently experiencing an issue when navigating the dropdown with the keyboard and selecting an item with Enter or Tab. I'm getting the following exception:

Uncaught TypeError: Cannot read property 'name' of undefined
    at react-super-select.js:1
    at arrayMap (_arrayMap.js:16)
    at map (map.js:50)
    at ReactSuperSelect._getNormalDisplayMarkup (react-super-select.js:1)
    at ReactSuperSelect.wrapper [as _getNormalDisplayMarkup] (_createBind.js:23)
    at ReactSuperSelect._generateValueDisplay (react-super-select.js:1)
    at ReactSuperSelect.wrapper [as _generateValueDisplay] (_createBind.js:23)
    at ReactSuperSelect.render (react-super-select.js:1)
    at finishClassComponent (react-dom.development.js:8389)
    at updateClassComponent (react-dom.development.js:8357)
    at beginWork (react-dom.development.js:8982)
    at performUnitOfWork (react-dom.development.js:11814)
    at workLoop (react-dom.development.js:11843)
    at HTMLUnknownElement.callCallback (react-dom.development.js:100)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:138)
    at invokeGuardedCallback (react-dom.development.js:187)
    at replayUnitOfWork (react-dom.development.js:11318)
    at renderRoot (react-dom.development.js:11885)
    at performWorkOnRoot (react-dom.development.js:12449)
    at performWork (react-dom.development.js:12370)
    at performSyncWork (react-dom.development.js:12347)
    at interactiveUpdates (react-dom.development.js:12597)
    at interactiveUpdates (react-dom.development.js:1958)
    at dispatchInteractiveEvent (react-dom.development.js:4259)

Any idea what the issue could be?

Chnoch commented 6 years ago

Apparently this has been solved by either version 1.0.16 or 1.0.17. We were up until recently on version 1.0.15 and once I upgraded react-super-select to the latest version the issue disappeared. Thanks for your work.