Skip to content

Commit 6c4d002

Browse files
feat(ui): hide reset node field value button when value is unchanged
1 parent b2cfa13 commit 6c4d002

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

invokeai/frontend/web/src/features/nodes/components/flow/nodes/Invocation/fields/NodeFieldElementResetToInitialValueIconButton.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ export const NodeFieldElementResetToInitialValueIconButton = memo(({ element }:
1515
const { nodeId, fieldName } = data.fieldIdentifier;
1616
const { isValueChanged, resetToInitialValue } = useInputFieldInitialFormValue(id, nodeId, fieldName);
1717

18+
if (!isValueChanged) {
19+
return null;
20+
}
21+
1822
return (
1923
<IconButton
2024
variant="link"

0 commit comments

Comments
 (0)