Merge pull request #542 from Fisker-Inc/CEC-6085-2

CEC-6085 - UI fixes for trex log search
This commit is contained in:
Paul Adamsen
2024-07-23 16:16:53 -04:00
committed by GitHub
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);
}; };