update customers,

This commit is contained in:
louiscklaw
2025-04-23 02:02:47 +08:00
parent c8d184465a
commit 41cc82d54d
6 changed files with 215 additions and 62 deletions

View File

@@ -96,15 +96,13 @@ export default function Page({ searchParams }: PageProps): React.JSX.Element {
React.useEffect(() => {
if (!isFirstRun.current) {
isFirstRun.current = true;
} else if (JSON.stringify(listOption) !== JSON.stringify(lastListOption)) {
// reset page number as tab changes
setLastListOption(listOption);
setCurrentPage(0);
void reloadRows();
} else {
if (JSON.stringify(listOption) !== JSON.stringify(lastListOption)) {
// reset page number as tab changes
setLastListOption(listOption);
setCurrentPage(0);
void reloadRows();
} else {
void reloadRows();
}
void reloadRows();
}
}, [currentPage, rowsPerPage, listOption]);