Added missing shouldItemRender to <Autocomplete/>. #219

This commit is contained in:
orangemug 2018-01-19 12:11:34 +00:00
parent a33d1b819c
commit 721f9b36b3

View file

@ -70,6 +70,9 @@ class AutocompleteInput extends React.Component {
getItemValue={(item) => item[0]} getItemValue={(item) => item[0]}
onSelect={v => this.props.onChange(v)} onSelect={v => this.props.onChange(v)}
onChange={(e, v) => this.props.onChange(v)} onChange={(e, v) => this.props.onChange(v)}
shouldItemRender={(item, value) => {
return item[0].toLowerCase().indexOf(value.toLowerCase()) > -1
}}
renderItem={(item, isHighlighted) => ( renderItem={(item, isHighlighted) => (
<div <div
key={item[0]} key={item[0]}