From a0c5887d9a5ec8826153752310be711c3aed7c9a Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Wed, 29 Nov 2023 17:59:54 -0300 Subject: [PATCH] Fixed custom component only updating when dragging it --- .../GenericNode/components/parameterComponent/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index b41d3f037..55c732f79 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -120,10 +120,9 @@ export default function ParameterComponent({ const handleOnNewValue = ( newValue: string | string[] | boolean | Object[] ): void => { - if (data.node!.template[name].value === newValue) { - return; + if (data.node!.template[name].value !== newValue) { + takeSnapshot(); } - takeSnapshot(); data.node!.template[name].value = newValue; // Set state to pending //@ts-ignore