mirror of
https://github.com/danog/react-datalist-input.git
synced 2025-01-22 22:02:27 +01:00
only show menu if matches are there
This commit is contained in:
parent
996553f044
commit
30dafc8838
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-datalist-input",
|
"name": "react-datalist-input",
|
||||||
"version": "1.1.10",
|
"version": "1.1.11",
|
||||||
"description": "This package provides a react component as follows: an input field with a drop down menu to pick a possible option based on the current input.",
|
"description": "This package provides a react component as follows: an input field with a drop down menu to pick a possible option based on the current input.",
|
||||||
"main": "./lib/DataListInput.js",
|
"main": "./lib/DataListInput.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -40,7 +40,12 @@ class DataListInput extends React.Component {
|
|||||||
visible: true,
|
visible: true,
|
||||||
} );
|
} );
|
||||||
} else {
|
} else {
|
||||||
this.setState( { currentInput } )
|
this.setState( {
|
||||||
|
currentInput,
|
||||||
|
matchingItems,
|
||||||
|
visible: false,
|
||||||
|
focusIndex: -1,
|
||||||
|
} )
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user