diff --git a/src/modules/explorer/pages/Treasury/components/BalancesTable.tsx b/src/modules/explorer/pages/Treasury/components/BalancesTable.tsx index c292410b..448e7004 100644 --- a/src/modules/explorer/pages/Treasury/components/BalancesTable.tsx +++ b/src/modules/explorer/pages/Treasury/components/BalancesTable.tsx @@ -103,6 +103,7 @@ const titleDataMatcher = (title: (typeof titles)[number], rowData: RowData) => { interface TableProps { rows: RowData[] + searchText?: string tezosBalance: BigNumber openXTZTransferModal: () => void openTokenTransferModal: (tokenAddress: string) => void @@ -112,6 +113,7 @@ interface TableProps { const BalancesList: React.FC = ({ rows, + searchText, tezosBalance, openTokenTransferModal, openXTZTransferModal, @@ -127,6 +129,13 @@ const BalancesList: React.FC = ({ setList(rows) }, [rows]) + useEffect(() => { + if (searchText && searchText.length > 0) { + setOffset(0) + setCurrentPage(0) + } + }, [searchText]) + // useEffect(() => { // if (list) { // const val = list.findIndex(row => row.symbol === "XTZ") @@ -388,6 +397,7 @@ export const BalancesTable: React.FC = () => {