mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
BIG-88: Reset table state once the table unmount.
This commit is contained in:
@@ -24,18 +24,14 @@ function ExpensesList({
|
||||
expensesTableStateChanged,
|
||||
|
||||
// #withExpensesActions
|
||||
setExpensesTableState,
|
||||
resetExpensesTableState,
|
||||
}) {
|
||||
// Resets the accounts table state once the page unmount.
|
||||
useEffect(
|
||||
() => () => {
|
||||
setExpensesTableState({
|
||||
filterRoles: [],
|
||||
viewSlug: '',
|
||||
pageIndex: 0,
|
||||
});
|
||||
resetExpensesTableState();
|
||||
},
|
||||
[setExpensesTableState],
|
||||
[resetExpensesTableState],
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user