fix clear filter wallet history

This commit is contained in:
bagusajisaputroo
2025-05-02 16:39:56 +07:00
parent 30b26216da
commit fef07ae632

View File

@ -94,25 +94,26 @@ const ListToolbar = () => {
const handleClearAllFilters = () => {
const today = new Date();
const threeMonthsAgo = getOneMonthsAgo();
const oneMonthAgo = getOneMonthsAgo();
const resetDateRange = {
from: formatDate(threeMonthsAgo),
from: formatDate(oneMonthAgo),
to: formatDate(today)
};
setSearchValue('');
setWalletId('');
setDateRange(resetDateRange);
// table.getAllColumns().forEach((column) => {
// if (column.id !== 'CreatedAt') {
// column.setFilterValue(undefined);
// }
// });
table.getColumn('msisdn')?.setFilterValue('');
table.getColumn('id_wallet')?.setFilterValue('');
table.getColumn('CreatedAt')?.setFilterValue(resetDateRange);
table.setPageIndex(0);
setTimeout(() => {
table.setPageIndex(0);
reload();
}, 0);
};
const handleRefresh = () => {
const today = new Date();