mirror of
https://github.com/danog/react-datalist-input.git
synced 2025-01-23 06:12:21 +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
|
// do not trigger the callback function
|
||||||
// but still change state to fit new selection
|
// but still change state to fit new selection
|
||||||
this.setState( {
|
this.setState( {
|
||||||
currentInput: clearInputOnSelect ? selectedItem.label : '',
|
currentInput: clearInputOnSelect ? '' : selectedItem.label,
|
||||||
visible: false,
|
visible: false,
|
||||||
focusIndex: -1,
|
focusIndex: -1,
|
||||||
} );
|
} );
|
||||||
@ -133,7 +133,7 @@ class DataListInput extends React.Component {
|
|||||||
}
|
}
|
||||||
// change state to fit new selection
|
// change state to fit new selection
|
||||||
this.setState( {
|
this.setState( {
|
||||||
currentInput: clearInputOnSelect ? selectedItem.label : '',
|
currentInput: clearInputOnSelect ? '' : selectedItem.label,
|
||||||
lastValidItem: selectedItem,
|
lastValidItem: selectedItem,
|
||||||
visible: false,
|
visible: false,
|
||||||
focusIndex: -1,
|
focusIndex: -1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user