Skip to content

Commit

Permalink
Update SearchFooter logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon-edge authored and samholmes committed Dec 13, 2024
1 parent e5d42ef commit f4725a8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- changed: `WalletListScene` filter mode remains active on empty text
- changed: (iOS) `SimpleTextInput` back chevron replaced with "Cancel" button
- added: New Kado OTC provider integration.
- changed: Improved EdgeCrashEvent reporting with additional metadata, tags, and name/message information.
Expand Down
1 change: 0 additions & 1 deletion src/components/scenes/WalletListScene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export function WalletListScene(props: Props) {
})

const handlePressDone = useHandler(() => {
setKeepOpen(true)
setSorting(false)
})

Expand Down
12 changes: 2 additions & 10 deletions src/components/themed/SearchFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,8 @@ export const SearchFooter = (props: SearchFooterProps) => {
onChangeText(text)
})

const handleSearchBlur = useHandler(() => {
if (searchText === '') {
onDoneSearching()
}
})

const handleSearchClear = useHandler(() => {
if (!textInputRef.current?.isFocused()) {
onDoneSearching()
}
onDoneSearching()
})

const handleSearchFocus = useHandler(() => {
Expand Down Expand Up @@ -107,7 +99,7 @@ export const SearchFooter = (props: SearchFooterProps) => {
placeholder={placeholder}
onChangeText={handleSearchChangeText}
value={searchText}
onBlur={handleSearchBlur}
active={isSearching}
onClear={handleSearchClear}
onFocus={handleSearchFocus}
ref={textInputRef}
Expand Down

0 comments on commit f4725a8

Please sign in to comment.