Skip to content

Commit

Permalink
1.2.8 Bugfix - show zero-pos categories in filter
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Aug 11, 2017
1 parent 1b739ba commit 5a6d5ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "emoji-picker-react",
"version": "1.2.7",
"version": "1.2.8",
"description": "React emoji-picker component",
"main": "./dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/EmojiPicker/helpers/get_proximity/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function checkIfActiveCategory({ offset, offsets, scrollTop, next }) {
}

function isInViewport({ scrollTop, listHeight, offsets, index}) {
return offsets[index] < (listHeight + scrollTop) && offsets[index] > scrollTop;
return offsets[index] <= (listHeight + scrollTop) && offsets[index] >= scrollTop;
}

function isElementInProximity({scrollTop, offset}) {
Expand Down
2 changes: 1 addition & 1 deletion src/EmojiPicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class EmojiPicker extends Component {
this.setState({ filter }, () => {
this._list.scrollTop = 0;
if (!filter) { return this.setActiveCategory(0); }
this.setSeenInSearch(this.proximity.inViewPort);
this.onScroll();
this.unsetActiveCategory();
});
}
Expand Down

0 comments on commit 5a6d5ff

Please sign in to comment.