mirror of
https://github.com/danog/react-datalist-input.git
synced 2025-01-22 22:02:27 +01:00
quick fix
This commit is contained in:
parent
9057ae97b8
commit
9509a88a0c
@ -125,7 +125,7 @@ class DataListInput extends React.Component {
|
||||
// do not trigger the callback function
|
||||
// but still change state to fit new selection
|
||||
this.setState( {
|
||||
currentInput: clearInputOnSelect ? selectedItem.label : '',
|
||||
currentInput: clearInputOnSelect ? '' : selectedItem.label,
|
||||
visible: false,
|
||||
focusIndex: -1,
|
||||
} );
|
||||
@ -133,7 +133,7 @@ class DataListInput extends React.Component {
|
||||
}
|
||||
// change state to fit new selection
|
||||
this.setState( {
|
||||
currentInput: clearInputOnSelect ? selectedItem.label : '',
|
||||
currentInput: clearInputOnSelect ? '' : selectedItem.label,
|
||||
lastValidItem: selectedItem,
|
||||
visible: false,
|
||||
focusIndex: -1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user