don't show autocomplete if no value in search

This commit is contained in:
Sean Yesmunt 2018-05-15 13:02:26 -04:00
parent a9d6248c31
commit 2fe2cbacee

View file

@ -445,6 +445,10 @@ export default class Autocomplete extends React.Component {
}
renderMenu() {
if (!this.props.value) {
return null;
}
const items = this.getFilteredItems(this.props).map((item, index) => {
const element = this.props.renderItem(item, this.state.highlightedIndex === index, {
cursor: 'default',