diff --git a/src/hooks/useDataTable.ts b/src/hooks/useDataTable.ts index fdc8df2..a733c82 100644 --- a/src/hooks/useDataTable.ts +++ b/src/hooks/useDataTable.ts @@ -181,7 +181,6 @@ export function useDataTable({ const filterableColumnFilters = columnFilters.filter((filter) => { return filterableColumns.find((column) => column.value === filter.id) }) - const [mounted, setMounted] = useState(false) useEffect(() => { @@ -227,7 +226,9 @@ export function useDataTable({ } // After cumulating all the changes, push new params - router.push(`${pathname}?${createQueryString(newParamsObject)}`) + router.push(`${pathname}?${createQueryString(newParamsObject)}`, { + scroll: false, + }) table.setPageIndex(0)