File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ export interface TransactionListParams {
3030 walletName : string
3131 tokenId : EdgeTokenId
3232 countryCode ?: string
33+ searchText ?: string
3334}
3435
3536type ListItem = EdgeTransaction | string | null
@@ -39,6 +40,7 @@ interface Props extends WalletsTabSceneProps<'transactionList'> {
3940
4041function TransactionListComponent ( props : Props ) {
4142 const { navigation, route, wallet } = props
43+ const { searchText : initSearchText } = route . params
4244 const theme = useTheme ( )
4345 const styles = getStyles ( theme )
4446 const dispatch = useDispatch ( )
@@ -48,8 +50,8 @@ function TransactionListComponent(props: Props) {
4850
4951 // State:
5052 const flashListRef = React . useRef < Animated . FlatList < ListItem > | null > ( null )
51- const [ isSearching , setIsSearching ] = React . useState ( false )
52- const [ searchText , setSearchText ] = React . useState ( '' )
53+ const [ isSearching , setIsSearching ] = React . useState ( initSearchText != null )
54+ const [ searchText , setSearchText ] = React . useState ( initSearchText ?? '' )
5355 const [ footerHeight , setFooterHeight ] = React . useState < number | undefined > ( )
5456
5557 // 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