mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-27 10:05:24 +01:00
Only render strings in the autocomplete menu.
Expression objects were making there way into this menu which was crashing the editor.
This commit is contained in:
parent
889005de6c
commit
588b18d10e
1 changed files with 3 additions and 1 deletions
|
@ -70,7 +70,9 @@ class AutocompleteInput extends React.Component {
|
|||
onSelect={v => this.props.onChange(v)}
|
||||
onChange={(e, v) => this.props.onChange(v)}
|
||||
shouldItemRender={(item, value="") => {
|
||||
return item[0].toLowerCase().indexOf(value.toLowerCase()) > -1
|
||||
if (typeof(value) === "string") {
|
||||
return item[0].toLowerCase().indexOf(value.toLowerCase()) > -1
|
||||
}
|
||||
}}
|
||||
renderItem={(item, isHighlighted) => (
|
||||
<div
|
||||
|
|
Loading…
Reference in a new issue