update for filter transaction
This commit is contained in:
@ -164,9 +164,11 @@ const ListToolbar = () => {
|
||||
variant="outline"
|
||||
className="h-7.5"
|
||||
onClick={() => {
|
||||
// Preserve trxDate values (from, to) and reset others
|
||||
const today = new Date();
|
||||
const firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 1);
|
||||
|
||||
// Only reset filters excluding from and to
|
||||
setSearchValue('');
|
||||
setStatusValue('');
|
||||
setTypeValue('');
|
||||
@ -175,6 +177,7 @@ const ListToolbar = () => {
|
||||
to: formatDate(today),
|
||||
});
|
||||
|
||||
// Reset other filters except for date range
|
||||
table.setColumnFilters([
|
||||
{ id: 'code', value: '' },
|
||||
{ id: 'status', value: '' },
|
||||
|
||||
Reference in New Issue
Block a user