From 60054acfa8c80269ccc1a624bd0c0cbe2ceabb51 Mon Sep 17 00:00:00 2001 From: mansisce Date: Tue, 21 Mar 2017 00:47:27 +0530 Subject: [PATCH] MultiSelection after you add space will not load In the case of multiselection, it shouldn't accept space after an option is selected. This is being fixed with this change. Check example GithubUsers. --- src/Select.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Select.js b/src/Select.js index cbb8024a3d..802f9f686c 100644 --- a/src/Select.js +++ b/src/Select.js @@ -448,7 +448,10 @@ const Select = React.createClass({ handleInputChange (event) { let newInputValue = event.target.value; - + const trimedInp = newInputValue.trim(); + if (!trimedInp) { + return; + } if (this.state.inputValue !== event.target.value && this.props.onInputChange) { let nextState = this.props.onInputChange(newInputValue); // Note: != used deliberately here to catch undefined and null