Skip to content

Commit 6d953c6

Browse files
authored
fix: update dependency array in JsonFormsAnyOfControl to prevent unnecessary re-renders (#1670)
1 parent 789fe89 commit 6d953c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/studio/src/features/editing-experience/components/form-builder/renderers/controls/JsonFormsAnyOfControl.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ export function JsonFormsAnyOfControl({
9797
if (options[0]) {
9898
setVariant(options[0].label)
9999
}
100-
}, [options, indexOfFittingSchema])
100+
// eslint-disable-next-line react-hooks/exhaustive-deps
101+
}, [])
101102

102103
return (
103104
<>

0 commit comments

Comments
 (0)