You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observed behaviour: Runtime exception: TypeError: Cannot read properties of undefined (reading 'languages'). It seems that getSectionSuggestions is called after onSuggestionsClearRequested with a value of undefined.
Are you reporting a bug?
https://stackblitz.com/edit/oliverjash-react-autosuggest-clear-and-focus-qi2jdy?file=src%2FApp.js
On a mobile/touch device, select a suggestion.
Observed behaviour: Runtime exception:
TypeError: Cannot read properties of undefined (reading 'languages'). It seems thatgetSectionSuggestionsis called afteronSuggestionsClearRequestedwith a value ofundefined.Expected behaviour: No runtime exception
Screen.Recording.2022-10-05.at.10.24.24.mov
Here's another reduced test case using exactly the same code but running with React 17 instead of React 18: https://stackblitz.com/edit/oliverjash-react-autosuggest-clear-and-focus-ajv2xi?file=src%2FApp.js. This one doesn't have the same problem. The problem only seems to occur when using React 18 and the new
createRootAPI.Note also that this problem does not occur when we're not using
multiSection: https://stackblitz.com/edit/oliverjash-react-autosuggest-clear-and-focus-w7yg7r?file=src%2FApp.js