don't show autocomplete if no value in search
This commit is contained in:
parent
a9d6248c31
commit
2fe2cbacee
1 changed files with 4 additions and 0 deletions
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue