From 6c4d002bd61dbff7e93a175f4e83af5d74ae6709 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 21 Feb 2025 09:25:14 +1000 Subject: [PATCH] feat(ui): hide reset node field value button when value is unchanged --- .../fields/NodeFieldElementResetToInitialValueIconButton.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Invocation/fields/NodeFieldElementResetToInitialValueIconButton.tsx b/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Invocation/fields/NodeFieldElementResetToInitialValueIconButton.tsx index 2a617174bd..2f87b354ba 100644 --- a/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Invocation/fields/NodeFieldElementResetToInitialValueIconButton.tsx +++ b/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Invocation/fields/NodeFieldElementResetToInitialValueIconButton.tsx @@ -15,6 +15,10 @@ export const NodeFieldElementResetToInitialValueIconButton = memo(({ element }: const { nodeId, fieldName } = data.fieldIdentifier; const { isValueChanged, resetToInitialValue } = useInputFieldInitialFormValue(id, nodeId, fieldName); + if (!isValueChanged) { + return null; + } + return (