From b3a6deb71b78b3447af2e680ca2089f7282a5815 Mon Sep 17 00:00:00 2001 From: dnazarenkoo <134951516+dnazarenkoo@users.noreply.github.com> Date: Tue, 18 Jul 2023 10:12:05 +0300 Subject: [PATCH] fix: resets the state of adding a new panel (#3122) Co-authored-by: Vishal Sharma Co-authored-by: Palash Gupta --- frontend/src/container/GridGraphLayout/index.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/container/GridGraphLayout/index.tsx b/frontend/src/container/GridGraphLayout/index.tsx index 2235b93708..6b6ec7d883 100644 --- a/frontend/src/container/GridGraphLayout/index.tsx +++ b/frontend/src/container/GridGraphLayout/index.tsx @@ -326,6 +326,13 @@ function GridGraph(props: Props): JSX.Element { errorMessage, ]); + useEffect( + () => (): void => { + toggleAddWidget(false); + }, + [toggleAddWidget], + ); + return (