CEC-6085 - UI fixes for trex log search
This commit is contained in:
@@ -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";
|
||||||
|
|||||||
@@ -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);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user