Merge pull request #592 from bluewave-labs/fix/fe/pagination-reset

Added pagination resets, resolve #588
This commit is contained in:
Alexander Holliday authored and GitHub committed 2024-08-11 10:02:09 -07:00
commit 4d9a790aa4
2 files changed
+14

No files matched your search

@@ -28,6 +28,13 @@ const IncidentTable = ({ monitors, selectedMonitor, filter }) => {
rowsPerPage: 12,
});
useEffect(() => {
setPaginationController({
...paginationController,
page: 0,
});
}, [filter, selectedMonitor]);
useEffect(() => {
const fetchPage = async () => {
if (!monitors || Object.keys(monitors).length === 0) {
@@ -27,6 +27,13 @@ const PaginationTable = ({ monitorId, dateRange }) => {
rowsPerPage: 5,
});
useEffect(() => {
setPaginationController({
...paginationController,
page: 0,
});
}, [dateRange]);
useEffect(() => {
const fetchPage = async () => {
try {