Skip to content

Commit

Permalink
1761 - debounce saving of hidden properties
Browse files Browse the repository at this point in the history
  • Loading branch information
kresimir-coko committed Nov 28, 2024
1 parent 8f515fc commit 4441e0f
Showing 1 changed file with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -866,15 +866,21 @@ const Property = ({
updateWorkflowNodeParameterMutation &&
resolvePath(currentComponent.parameters, path) !== defaultValue
) {
saveProperty({
currentComponent,
path,
setCurrentComponent,
type,
updateWorkflowNodeParameterMutation,
value: defaultValue,
workflowId: workflow.id!,
});
const saveDefaultValue = () => {
saveProperty({
currentComponent,
path,
setCurrentComponent,
type,
updateWorkflowNodeParameterMutation,
value: defaultValue,
workflowId: workflow.id!,
});
};

const timeoutId = setTimeout(saveDefaultValue, 200);

return () => clearTimeout(timeoutId);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
Expand Down

0 comments on commit 4441e0f

Please sign in to comment.