quick fix

This commit is contained in:
Andre Landgraf 2019-06-13 11:36:16 +02:00
parent 9057ae97b8
commit 9509a88a0c

View File

@ -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,