From 56566b00624340f7a998d2ddab9293df3d9a6e63 Mon Sep 17 00:00:00 2001 From: David Radley Date: Fri, 29 Apr 2022 17:34:20 +0100 Subject: [PATCH] git427 correct time resetting Signed-off-by: David Radley --- .../contexts/InstancesContext.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/cra-client/src/components/RepositoryExplorer/contexts/InstancesContext.js b/cra-client/src/components/RepositoryExplorer/contexts/InstancesContext.js index c1808cea..de19e432 100644 --- a/cra-client/src/components/RepositoryExplorer/contexts/InstancesContext.js +++ b/cra-client/src/components/RepositoryExplorer/contexts/InstancesContext.js @@ -151,15 +151,16 @@ const InstancesContextProvider = (props) => { */ const [latestActiveGenId, setLatestActiveGenId] = useState(0); - // useEffect(() => { - // console.log(" useEffect [useHistoricalQuery]]); " + useHistoricalQuery); + useEffect(() => { + console.log(" useEffect [useHistoricalQuery]]); " + useHistoricalQuery); - // // make sure that the date and time are reset . - // setAsOfTimeStr(""); - // setAsOfDate(undefined); - // // setAsOfDateTimeStr(""); - // clear(); - // }, [useHistoricalQuery]); + // make sure that the date and time are reset . + setAsOfTimeStr(""); + setAsOfDate(undefined); + setAsOfFormattedDate(undefined); + + clear(); + }, [useHistoricalQuery]); useEffect(() => { console.log(" useEffect [asOfTimeStr, asOfDate]); ");