update filter
This commit is contained in:
@ -61,9 +61,9 @@ const ListToolbar = () => {
|
||||
|
||||
useEffect(() => {
|
||||
const today = new Date();
|
||||
const firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 1);
|
||||
// const firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 1);
|
||||
settrxDate({
|
||||
from: formatDate(firstDayOfMonth),
|
||||
from: formatDate(today),
|
||||
to: formatDate(today),
|
||||
});
|
||||
}, []);
|
||||
@ -167,14 +167,14 @@ const ListToolbar = () => {
|
||||
onClick={() => {
|
||||
// Preserve trxDate values (from, to) and reset others
|
||||
const today = new Date();
|
||||
const firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 1);
|
||||
// const firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 1);
|
||||
|
||||
// Only reset filters excluding from and to
|
||||
setSearchValue('');
|
||||
// setStatusValue('');
|
||||
setTypeValue('');
|
||||
settrxDate({
|
||||
from: formatDate(firstDayOfMonth),
|
||||
from: formatDate(today),
|
||||
to: formatDate(today),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user