diff --git a/src/Typeahead.jsx b/src/Typeahead.jsx index 306b045..5f85c92 100644 --- a/src/Typeahead.jsx +++ b/src/Typeahead.jsx @@ -489,6 +489,12 @@ export default class Typeahead extends PureComponent { const {autoSelectSingleOption, options} = this.props; if (autoSelectSingleOption && options.length === 1) { const valueOfSingleOption = options[0].value; + this.setState({ + highlightedIndex: 0, + value: valueOfSingleOption, + typedLabel: Typeahead._getLabelByValue(valueOfSingleOption, this.props.options, + this.props.allowUnknownValue) + }); this._fireOnChange(valueOfSingleOption); }