Skip to content

Commit

Permalink
Fixed #249
Browse files Browse the repository at this point in the history
  • Loading branch information
Çağatay Çivici committed Dec 12, 2017
1 parent 661853d commit ecd7790
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/autocomplete/AutoComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class AutoComplete extends Component {
clearTimeout(this.timeout);
}

let query = event.target.value.trim();
let query = event.target.value;
if(!this.props.multiple) {
this.manualModelChange = true;
this.updateModel(event, query);
Expand Down Expand Up @@ -162,8 +162,8 @@ export class AutoComplete extends Component {
}

search(event, query) {
//allow empty string but not undefined or null
if(query === undefined || query === null) {
//allow empty string but not undefined or null or empty
if(query === undefined || query === null || query.trim().length === 0) {

This comment has been minimized.

Copy link
@joshdanhall

joshdanhall Dec 14, 2017

This breaks dropdown. When dropdown is clicked, completeMethod is not invoked.

return;
}

Expand Down

0 comments on commit ecd7790

Please sign in to comment.