Skip to content

Commit

Permalink
Merge pull request #15402 from bernhardoj/fix/15132
Browse files Browse the repository at this point in the history
Hide emoji category picker while searching
  • Loading branch information
stitesExpensify authored Feb 27, 2023
2 parents b663634 + 05187b1 commit e6c486c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/components/EmojiPicker/EmojiPickerMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,17 +466,14 @@ class EmojiPickerMenu extends Component {
}

render() {
const isFiltered = this.emojis.length !== this.state.filteredEmojis.length;
return (
<View
style={[styles.emojiPickerContainer, StyleUtils.getEmojiPickerStyle(this.props.isSmallScreenWidth)]}
pointerEvents={this.state.arePointerEventsDisabled ? 'none' : 'auto'}
>
<CategoryShortcutBar
headerIndices={this.headerIndices}
onPress={this.scrollToHeader}
/>
{!this.props.isSmallScreenWidth && (
<View style={[styles.ph4, styles.pb1]}>
<View style={[styles.ph4, styles.pb1, styles.pt2]}>
<TextInput
label={this.props.translate('common.search')}
onChangeText={this.filterEmojis}
Expand All @@ -490,6 +487,12 @@ class EmojiPickerMenu extends Component {
/>
</View>
)}
{!isFiltered && (
<CategoryShortcutBar
headerIndices={this.headerIndices}
onPress={this.scrollToHeader}
/>
)}
{this.state.filteredEmojis.length === 0
? (
<Text
Expand Down

0 comments on commit e6c486c

Please sign in to comment.