From 889005de6c29a426ccbfde1e650226a41a6c6674 Mon Sep 17 00:00:00 2001 From: orangemug Date: Tue, 9 Oct 2018 21:11:47 +0100 Subject: [PATCH] Set default value of autocomplete shouldItemRender value param as sometimes it's undefined --- src/components/inputs/AutocompleteInput.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/inputs/AutocompleteInput.jsx b/src/components/inputs/AutocompleteInput.jsx index 2ba6ef8..a2a5bf0 100644 --- a/src/components/inputs/AutocompleteInput.jsx +++ b/src/components/inputs/AutocompleteInput.jsx @@ -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) => (