This commit is contained in:
Andre Landgraf 2019-06-13 23:19:31 +02:00
parent b154d2ee09
commit 1f410009bc
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "react-datalist-input",
"version": "1.1.22",
"version": "1.1.23",
"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",
"license": "MIT",

View File

@ -71,7 +71,7 @@ class DataListInput extends React.Component {
const displayableItems = matchingItems.length
? matchingItems : items.slice( 0, dropDownLength )
let index = lastValidItem && !clearInputOnSelect
? indexOfItem( lastValidItem, displayableItems ) : 0;
? this.indexOfItem( lastValidItem, displayableItems ) : 0;
index = index > 0 ? index : 0;
this.setState( { visible: true, matchingItems: displayableItems, focusIndex: index, } );
}