Unselect categories when searching

nolan/hinaloe-test
Etienne Lemay 2017-05-27 13:36:41 -04:00
parent 1e87212374
commit 7d014966e6
1 changed files with 31 additions and 26 deletions

View File

@ -198,10 +198,14 @@ export default class Picker extends React.Component {
return
}
let activeCategory = null
if (SEARCH_CATEGORY.emojis) {
activeCategory = SEARCH_CATEGORY
} else {
var target = this.refs.scroll,
scrollTop = target.scrollTop,
scrollingDown = scrollTop > (this.scrollTop || 0),
activeCategory = null,
minTop = 0
for (let i = 0, l = this.categories.length; i < l; i++) {
@ -234,6 +238,7 @@ export default class Picker extends React.Component {
} else if (scrollTop + this.clientHeight >= this.scrollHeight) {
activeCategory = this.categories[this.categories.length - 1]
}
}
if (activeCategory) {
let { anchors } = this.refs,