From f00ec30efffebea30e6f291c3eba92ea02b8a652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fred=20Lef=C3=A9v=C3=A8re-Laoide?= <90181748+FredLL-Avaiga@users.noreply.github.com> Date: Fri, 18 Oct 2024 22:43:11 +0200 Subject: [PATCH] datanode properties load and refresh (#2099) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit resolves #2088 Co-authored-by: Fred Lefévère-Laoide --- frontend/taipy/src/DataNodeViewer.tsx | 6 +-- taipy/gui_core/_context.py | 6 +-- tests/gui_core/test_context_dn_properties.py | 53 ++++++++++++++++++++ 3 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 tests/gui_core/test_context_dn_properties.py diff --git a/frontend/taipy/src/DataNodeViewer.tsx b/frontend/taipy/src/DataNodeViewer.tsx index 98d8e985f9..95cb03022d 100644 --- a/frontend/taipy/src/DataNodeViewer.tsx +++ b/frontend/taipy/src/DataNodeViewer.tsx @@ -413,7 +413,7 @@ const DataNodeViewer = (props: DataNodeViewerProps) => { setPropertiesRequested((req) => { if ((req || !showData) && tabValue == TabValues.Properties) { const idVar = getUpdateVar(updateDnVars, "properties_id"); - const vars = getUpdateVarNames(updateVars, "properties"); + const vars = getUpdateVarNames(updateVars, "dnProperties"); Promise.resolve().then(() => dispatch( createRequestUpdateAction(id, module, vars, true, idVar ? { [idVar]: newDnId } : undefined) @@ -631,7 +631,7 @@ const DataNodeViewer = (props: DataNodeViewerProps) => { ); // file action - const onfileHandler = useCallback( + const onFileHandler = useCallback( (e: MouseEvent) => { e.stopPropagation(); const { action = "import" } = e.currentTarget.dataset || {}; @@ -733,7 +733,7 @@ const DataNodeViewer = (props: DataNodeViewerProps) => {