Skip to content

Commit 3f12c33

Browse files
authored
Merge pull request #9534 from Puneet-here/add-focus-indicator
add focus indicator for emoji picker search field
2 parents 1a0b841 + f0dd8f1 commit 3f12c33

File tree

1 file changed

+4
-1
lines changed
  • src/components/EmojiPicker/EmojiPickerMenu

1 file changed

+4
-1
lines changed

src/components/EmojiPicker/EmojiPickerMenu/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ class EmojiPickerMenu extends Component {
9898
start: 0,
9999
end: 0,
100100
},
101+
isFocused: false,
101102
};
102103
}
103104

@@ -441,12 +442,14 @@ class EmojiPickerMenu extends Component {
441442
placeholder={this.props.translate('common.search')}
442443
placeholderTextColor={themeColors.textSupporting}
443444
onChangeText={this.filterEmojis}
444-
style={styles.textInput}
445+
style={[styles.textInput, this.state.isFocused && styles.borderColorFocus]}
445446
defaultValue=""
446447
ref={el => this.searchInput = el}
447448
autoFocus
448449
selectTextOnFocus={this.state.selectTextOnFocus}
449450
onSelectionChange={this.onSelectionChange}
451+
onFocus={() => this.setState({isFocused: true})}
452+
onBlur={() => this.setState({isFocused: false})}
450453
/>
451454
</View>
452455
)}

0 commit comments

Comments
 (0)