mirror of
https://github.com/maputnik/editor.git
synced 2026-11-29 13:24:20 +00: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:
1 parent
889005de6c
commit
588b18d10e
1 file changed
+3
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user