mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
feat: select all text when focus search bar
This commit is contained in:
parent
c5cb36377a
commit
89e3f24e29
1 changed files with 4 additions and 1 deletions
|
|
@ -16,7 +16,10 @@ export function SearchBar({ onSearch, onFocus, searchKey }: Props) {
|
|||
<TextInput
|
||||
backgroundColor="white"
|
||||
icon={SearchIcon as any}
|
||||
onFocus={onFocus}
|
||||
onFocus={e => {
|
||||
onFocus(e)
|
||||
e.target.select()
|
||||
}}
|
||||
tabIndex={0}
|
||||
className={cx('search-input', {
|
||||
error: !isValidRegexpSource(searchKey),
|
||||
|
|
|
|||
Loading…
Reference in a new issue