mirror of
https://github.com/maputnik/editor.git
synced 2026-01-04 12:30:00 +00:00
Set default value of autocomplete shouldItemRender value param as sometimes it's undefined
This commit is contained in:
@@ -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) => (
|
||||
|
||||
Reference in New Issue
Block a user