react-tag-autocomplete
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -23,3 +23,2 @@ 'use strict'; | ||
propTypes: { | ||
busy: React.PropTypes.bool, | ||
tags: React.PropTypes.array, | ||
@@ -34,3 +33,4 @@ placeholder: React.PropTypes.string, | ||
handleInputChange: React.PropTypes.func, | ||
minQueryLength: React.PropTypes.number | ||
minQueryLength: React.PropTypes.number, | ||
maxSuggestionsLength: React.PropTypes.number | ||
}, | ||
@@ -40,3 +40,2 @@ | ||
return { | ||
busy: false, | ||
tags: [], | ||
@@ -48,3 +47,4 @@ placeholder: 'Add new tag', | ||
autoresize: true, | ||
minQueryLength: 2 | ||
minQueryLength: 2, | ||
maxSuggestionsLength: 6 | ||
}; | ||
@@ -76,3 +76,3 @@ }, | ||
this.setState({ | ||
suggestions: this.filteredSuggestions(this.state.query, newProps.suggestions) | ||
suggestions: this.filteredSuggestions(this.state.query, newProps.suggestions).slice(0, this.props.maxSuggestionsLength) | ||
}); | ||
@@ -95,3 +95,3 @@ }, | ||
query: query, | ||
suggestions: this.filteredSuggestions(query, this.props.suggestions) | ||
suggestions: this.filteredSuggestions(query, this.props.suggestions).slice(0, this.props.maxSuggestionsLength) | ||
}); | ||
@@ -206,3 +206,2 @@ }, | ||
var placeholder = _props.placeholder; | ||
var busy = _props.busy; | ||
var minQueryLength = _props.minQueryLength; | ||
@@ -233,6 +232,4 @@ var autoresize = _props.autoresize; | ||
'aria-expanded': selectedIndex > -1, | ||
'aria-busy': busy, | ||
onChange: this.handleChange, | ||
onKeyDown: this.handleKeyDown }), | ||
busy ? React.createElement('div', { className: 'ReactTags__busy' }) : null, | ||
React.createElement(Suggestions, { | ||
@@ -239,0 +236,0 @@ listboxId: listboxId, |
{ | ||
"name": "react-tag-autocomplete", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "React Tag Autocomplete is a simple tagging component ready to drop in your React projects.", | ||
@@ -5,0 +5,0 @@ "main": "dist/ReactTags.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1763048
1350