Set default value of autocomplete shouldItemRender value param as sometimes it's undefined

This commit is contained in:
orangemug 2018-10-09 21:11:47 +01:00
parent a666f86be0
commit 889005de6c

View file

@ -69,7 +69,7 @@ class AutocompleteInput extends React.Component {
getItemValue={(item) => item[0]}
onSelect={v => this.props.onChange(v)}
onChange={(e, v) => this.props.onChange(v)}
shouldItemRender={(item, value) => {
shouldItemRender={(item, value="") => {
return item[0].toLowerCase().indexOf(value.toLowerCase()) > -1
}}
renderItem={(item, isHighlighted) => (