From 9509a88a0cc713ef78e0c57c281c743f5a63a245 Mon Sep 17 00:00:00 2001 From: Andre Landgraf Date: Thu, 13 Jun 2019 11:36:16 +0200 Subject: [PATCH] quick fix --- src/DataListInput.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DataListInput.jsx b/src/DataListInput.jsx index 07b8cdb..02509d7 100644 --- a/src/DataListInput.jsx +++ b/src/DataListInput.jsx @@ -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,