Skip to content

Commit

Permalink
chore(release): version 1.22.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ro-ka committed Apr 26, 2016
1 parent b70d92f commit fdaed0d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 1.22.0 (2016-04-26)


#### Features

* **Geosuggest:**
* hardcode maxFixtures to 10 ([c2c3ef0f](https://github.com/ubilabs/react-geosuggest/commit/c2c3ef0f4a56b76720b90971c7b554b175ed0917))


## 1.21.0 (2016-04-15)

#### Features
Expand Down
10 changes: 9 additions & 1 deletion dist/react-geosuggest.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,18 @@ var Geosuggest = function (_React$Component) {

var suggests = [],
regex = new RegExp(escapeRegExp(this.state.userInput), 'gim'),
skipSuggest = this.props.skipSuggest;
skipSuggest = this.props.skipSuggest,
maxFixtures = 10,
fixturesSearched = 0;

this.props.fixtures.forEach(function (suggest) {
if (fixturesSearched >= maxFixtures) {
return;
}

if (!skipSuggest(suggest) && suggest.label.match(regex)) {
fixturesSearched++;

suggest.placeId = suggest.label;
suggests.push(suggest);
}
Expand Down
Loading

0 comments on commit fdaed0d

Please sign in to comment.