Skip to content

Commit

Permalink
Be able to go to category even while search is active
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinimala committed Jul 24, 2024
1 parent 16978d0 commit 9296df2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/emoji-mart/src/components/Picker/Picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,13 @@ export default class Picker extends Component {
}

handleCategoryClick = ({ category, i }) => {
this.scrollTo(i == 0 ? { row: -1 } : { categoryId: category.id })
if (this.state.searchResults) {
this.clearSearch()
}
this.unfocusSearch()
setTimeout(() => {
this.scrollTo(i == 0 ? { row: -1 } : { categoryId: category.id })
})
}

handleEmojiOver(pos) {
Expand Down

0 comments on commit 9296df2

Please sign in to comment.