CEC-6085 - UI fixes for trex log search

This commit is contained in:
padamsen_fisker
2024-07-23 12:01:02 -04:00
parent 58472e1707
commit 99c079cdea
2 changed files with 7 additions and 0 deletions

View File

@@ -4,6 +4,8 @@ jest.mock("../../Contexts/UserContext");
jest.mock("@material-ui/core/utils/unstable_useId", () => jest.mock("@material-ui/core/utils/unstable_useId", () =>
jest.fn().mockReturnValue("mui-test-id") jest.fn().mockReturnValue("mui-test-id")
); );
jest.useFakeTimers();
jest.setSystemTime(new Date(2024, 6, 18, 6, 30, 45, 100));
import { BrowserRouter } from "react-router-dom"; import { BrowserRouter } from "react-router-dom";
import { VehicleProvider } from "../../Contexts/VehicleContext"; import { VehicleProvider } from "../../Contexts/VehicleContext";

View File

@@ -247,6 +247,11 @@ const TRexLogsTable = ({ vin, token, classes }) => {
}; };
const handleSearch = (query) => { const handleSearch = (query) => {
setPageIndex(0);
setCurrentOffset(0)
setLogs([])
setAllLogsFetched(false)
setBlobSize(0)
setSearch(query); setSearch(query);
}; };