diff --git a/dist/react-typeahead.js b/dist/react-typeahead.js index 55f156bb..d4967ce9 100644 --- a/dist/react-typeahead.js +++ b/dist/react-typeahead.js @@ -2754,7 +2754,7 @@ var Typeahead = createReactClass({ if (this.props.onChange) { this.props.onChange(event); } - + this.setState({ isFocused: true, showResults: true }); this._onTextEntryUpdated(); }, @@ -3066,4 +3066,4 @@ var TypeaheadSelector = createReactClass({ module.exports = TypeaheadSelector; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlbGVjdG9yLmpzIl0sIm5hbWVzIjpbIlJlYWN0IiwicmVxdWlyZSIsIlR5cGVhaGVhZE9wdGlvbiIsImNsYXNzTmFtZXMiLCJjcmVhdGVSZWFjdENsYXNzIiwiUHJvcFR5cGVzIiwiVHlwZWFoZWFkU2VsZWN0b3IiLCJwcm9wVHlwZXMiLCJvcHRpb25zIiwiYXJyYXkiLCJhbGxvd0N1c3RvbVZhbHVlcyIsIm51bWJlciIsImN1c3RvbUNsYXNzZXMiLCJvYmplY3QiLCJjdXN0b21WYWx1ZSIsInN0cmluZyIsInNlbGVjdGlvbkluZGV4Iiwib25PcHRpb25TZWxlY3RlZCIsImZ1bmMiLCJkaXNwbGF5T3B0aW9uIiwiaXNSZXF1aXJlZCIsImRlZmF1bHRDbGFzc05hbWVzIiwiYm9vbCIsImFyZVJlc3VsdHNUcnVuY2F0ZWQiLCJyZXN1bHRzVHJ1bmNhdGVkTWVzc2FnZSIsImdldERlZmF1bHRQcm9wcyIsIm9wdGlvbiIsInJlbmRlciIsInByb3BzIiwibGVuZ3RoIiwiY2xhc3NlcyIsInJlc3VsdHMiLCJjbGFzc0xpc3QiLCJjdXN0b21WYWx1ZU9mZnNldCIsIl9vbkNsaWNrIiwiYmluZCIsIm1hcCIsInJlc3VsdCIsImkiLCJkaXNwbGF5U3RyaW5nIiwidW5pcXVlS2V5IiwicmVzdWx0c1RydW5jYXRlZENsYXNzZXMiLCJyZXN1b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ICAgICAgdmFyIHJlc3VsdHNUcnVuY2F0ZWRDbGFzc0xpc3QgPSBjbGFzc05hbWVzKHJlc3VsdHNUcnVuY2F0ZWRDbGFzc2VzKTtcblxuICAgICAgcmVzdWx0cy5wdXNoKFxuICAgICAgICA8bGkga2V5PVwicmVzdWx0cy10cnVuY2F0ZWRcIiBjbGFzc05hbWU9e3Jlc3VsdHNUcnVuY2F0ZWRDbGFzc0xpc3R9PlxuICAgICAgICAgIHt0aGlzLnByb3BzLnJlc3VsdHNUcnVuY2F0ZWRNZXNzYWdlfVxuICAgICAgICA8L2xpPlxuICAgICAgKTtcbiAgICB9XG5cbiAgICByZXR1cm4gKFxuICAgICAgPHVsIGNsYXNzTmFtZT17Y2xhc3NMaXN0fT5cbiAgICAgICAgeyBjdXN0b21WYWx1ZSB9XG4gICAgICAgIHsgcmVzdWx0cyB9XG4gICAgICA8L3VsPlxuICAgICk7XG4gIH0sXG5cbiAgX29uQ2xpY2s6IGZ1bmN0aW9uKHJlc3VsdCwgZXZlbnQpIHtcbiAgICByZXR1cm4gdGhpcy5wcm9wcy5vbk9wdGlvblNlbGVjdGVkKHJlc3VsdCwgZXZlbnQpO1xuICB9XG5cbn0pO1xuXG5tb2R1bGUuZXhwb3J0cyA9IFR5cGVhaGVhZFNlbGVjdG9yO1xuIl19 },{"./option":22,"classnames":1,"create-react-class":3,"prop-types":14,"react":"react"}]},{},[18])(18) -}); \ No newline at end of file +});