Skip to content

Commit f0dd8f1

Browse files
committed
add focus indicator
1 parent 3ef2729 commit f0dd8f1

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)