Merge pull request #893 from elbstack/dev

Pass currently active suggestion to onBlur handler
old
Javi Velasco 2016-10-28 10:05:04 +02:00 committed by GitHub
commit fee7a2b3ff
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ const factory = (Chip, Input) => {
handleQueryBlur = (event) => {
if (this.state.focus) this.setState({focus: false});
if (this.props.onBlur) this.props.onBlur(event);
if (this.props.onBlur) this.props.onBlur(event, this.state.active);
};
handleQueryChange = (value) => {

View File

@ -88,7 +88,7 @@ var factory = function factory(Chip, Input) {
});
}, _this.handleQueryBlur = function (event) {
if (_this.state.focus) _this.setState({ focus: false });
if (_this.props.onBlur) _this.props.onBlur(event);
if (_this.props.onBlur) _this.props.onBlur(event, _this.state.active);
}, _this.handleQueryChange = function (value) {
_this.setState({ query: value, showAllSuggestions: false });
}, _this.handleQueryFocus = function () {