fmoo/react-typeahead

On re-select the input-text the first option in list becomes selected by default.

nitin-daffodil opened this issue · 0 comments

Function _onTextEntryUpdated should be update to set the selectionIndex equal to null.

  _onTextEntryUpdated: function() {
    var value = this.refs.entry.value;
    this.setState({visible: this.getOptionsForValue(value, this.props.options),
                   selection: '',
                   selectionIndex: null,
                   entryValue: value});
  }