From 1d24b9b40c52af15d33d5242b8347016bbe9081e Mon Sep 17 00:00:00 2001 From: Tim Chamberlain Date: Wed, 22 May 2024 12:38:16 -0500 Subject: [PATCH] CE-938: updated 'flashing' occurring in child widget whenever any form fields are changed, instead of only the data in the widget --- src/qqq/components/forms/EntityForm.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/qqq/components/forms/EntityForm.tsx b/src/qqq/components/forms/EntityForm.tsx index c885367..7f5cbe9 100644 --- a/src/qqq/components/forms/EntityForm.tsx +++ b/src/qqq/components/forms/EntityForm.tsx @@ -119,6 +119,7 @@ function EntityForm(props: Props): JSX.Element const [, forceUpdate] = useReducer((x) => x + 1, 0); const [showEditChildForm, setShowEditChildForm] = useState(null as any); + const [modalDataChangedCounter, setModalDataChangedCount] = useState(0); const [notAllowedError, setNotAllowedError] = useState(null as string); @@ -282,6 +283,8 @@ function EntityForm(props: Props): JSX.Element setRenderedWidgetSections(newRenderedWidgetSections); forceUpdate(); + setModalDataChangedCount(modalDataChangedCounter + 1); + setShowEditChildForm(null); } @@ -375,7 +378,7 @@ function EntityForm(props: Props): JSX.Element widgetMetaData.showExportButton = false; return