Autocomplete getOptionLabel crashing app #20447
Labels
component: autocomplete
This is the name of the generic UI component, not the React module!
support: Stack Overflow
Please ask the community on Stack Overflow
The
Autocomplete
component is breaking our app if we pass an empty optionCurrent Behavior 😯
The
Autocomplete
component is breaking our siteExpected Behavior 🤔
The
Autocomplete
can't break our site, but return an error or warningSteps to Reproduce 🕹
Steps:
options
arraygetOptionLabel
prop is returning undefined on that empty objecthttps://codesandbox.io/s/bug-report-66yee?file=/demo.js
Context 🔦
It needs to give an error or warning, without breaking our app, since the error is not that clear and can take some time to figure out that the problem is the array
Your Environment 🌎
The text was updated successfully, but these errors were encountered: