A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.
fix(forms): break AppForm infinite render loop on edit page (#6198) (#6215)
Thomas82858ecd7536
diff --git a/packages/forms-collection/src/new-app/_form.tsx b/packages/forms-collection/src/new-app/_form.tsxindex 2bce21034..92f3a4c2f 100644--- a/packages/forms-collection/src/new-app/_form.tsx+++ b/packages/forms-collection/src/new-app/_form.tsx@@ -72,7 +72,14 @@ export const AppForm = ({}form.initialize(toFormValues(initialValues));- }, [initialValuesKey, form, initialValues]);+ // `form` is a new object every render (Mantine useForm returns a fresh literal),+ // so it must not be a dep here — it would re-run every render and, since+ // form.initialize() always calls clearErrors() (new {} object) internally,+ // trigger an infinite update loop. initialValuesKey (a primitive string)+ // already captures the only case this effect exists for: re-initializing+ // when initialValues actually changes (e.g. navigating between edit pages).+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [initialValuesKey]);// Debounce the name value with 200ms delayconst [debouncedName] = useDebouncedValue(form.values.name, 200);