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