File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ interface Props extends WalletsTabSceneProps<'transactionList'> {
4040
4141function TransactionListComponent ( props : Props ) {
4242 const { navigation, route, wallet } = props
43+ const { searchText : initSearchText } = route . params
4344 const theme = useTheme ( )
4445 const styles = getStyles ( theme )
4546 const dispatch = useDispatch ( )
@@ -49,8 +50,8 @@ function TransactionListComponent(props: Props) {
4950
5051 // State:
5152 const flashListRef = React . useRef < Animated . FlatList < ListItem > | null > ( null )
52- const [ isSearching , setIsSearching ] = React . useState ( false )
53- const [ searchText , setSearchText ] = React . useState ( '' )
53+ const [ isSearching , setIsSearching ] = React . useState ( initSearchText != null )
54+ const [ searchText , setSearchText ] = React . useState ( initSearchText ?? '' )
5455 const [ footerHeight , setFooterHeight ] = React . useState < number | undefined > ( )
5556
5657 // Watchers:
Original file line number Diff line number Diff line change @@ -178,7 +178,10 @@ function WalletDetailsComponent(props: Props) {
178178 } )
179179
180180 const handlePressSeeAll = useHandler ( ( ) => {
181- navigation . navigate ( 'transactionList' , route . params )
181+ navigation . navigate ( 'transactionList' , {
182+ ...route . params ,
183+ searchText : isSearching ? searchText : undefined
184+ } )
182185 } )
183186
184187 //
You can’t perform that action at this time.
0 commit comments