{"record":{"id":"edc567051b39b9f3","repo":"marmelab/react-admin","slug":"deprecated-formtab-now-wrap-their-content-inside","errorCode":null,"errorMessage":"Deprecated. FormTab now wrap their content inside a FormGroupContextProvider. If you implemented custom forms with tabs, please use the FormGroupContextProvider. See https://marmelab.com/react-admin","messagePattern":"Deprecated\\. FormTab now wrap their content inside a FormGroupContextProvider\\. If you implemented custom forms with tabs, please use the FormGroupContextProvider\\. See https://marmelab\\.com/react-admin","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/ra-ui-materialui/src/form/TabbedForm.tsx","lineNumber":134,"sourceCode":"            HtmlHTMLAttributes<HTMLFormElement>,\n            'defaultValue' | 'onSubmit' | 'children'\n        >,\n        Partial<TabbedFormViewProps> {\n    children: ReactNode;\n    className?: string;\n    defaultValues?: any;\n    formRootPathname?: string;\n    mutationMode?: MutationMode;\n    record?: RaRecord;\n    resource?: string;\n    syncWithLocation?: boolean;\n    tabs?: ReactElement;\n    toolbar?: ReactNode | false;\n    warnWhenUnsavedChanges?: boolean;\n}\n\nexport const findTabsWithErrors = (children, errors) => {\n    console.warn(\n        'Deprecated. FormTab now wrap their content inside a FormGroupContextProvider. If you implemented custom forms with tabs, please use the FormGroupContextProvider. See https://marmelab.com/react-admin/EditTutorial.html#grouping-inputs'\n    );\n\n    return Children.toArray(children).reduce((acc: any[], child) => {\n        if (!isValidElement(child)) {\n            return acc;\n        }\n\n        const inputs = Children.toArray(child.props.children);\n\n        if (\n            inputs.some(\n                input =>\n                    isValidElement(input) && get(errors, input.props.source)\n            )\n        ) {\n            return [...acc, child.props.label];\n        }","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/marmelab/react-admin/blob/051f511bb0afb5ea565c2d3728bf4dab0a6fa5e0/packages/ra-ui-materialui/src/form/TabbedForm.tsx#L116-L152","documentation":"findTabsWithErrors is a deprecated helper from older react-admin versions that scanned TabbedForm children for validation errors. Since FormTab now wraps its content in a FormGroupContextProvider, error tracking is handled internally and this helper only emits a deprecation warning. It is kept only to warn developers still calling it in custom tabbed forms.","triggerScenarios":"Calling the exported findTabsWithErrors(children, errors) function directly in custom form code, typically copied from old TabbedForm implementations.","commonSituations":"Upgrading react-admin while keeping a custom tabbed form that replicates old TabbedForm error-rendering behavior; old StackOverflow/blog snippets still calling the helper.","solutions":["Remove the findTabsWithErrors call entirely; TabbedForm/FormTab handle error display automatically.","If implementing custom tabbed forms, wrap tab content with FormGroupContextProvider as the message links suggest.","Follow the migration guide at https://marmelab.com/react-admin/EditTutorial.html#grouping-inputs."],"exampleFix":"// before\nconst tabsWithErrors = useMemo(() => findTabsWithErrors(children, errors), [children, errors]);\n// after\n// delete the call; use FormTab inside TabbedForm and errors render automatically\n<TabbedForm>\n  <FormTab label=\"Details\">\n    <TextInput source=\"name\" />\n  </FormTab>\n</TabbedForm>","handlingStrategy":"fallback","validationCode":"import { findTabsWithErrors } from 'ra-ui-materialui';\nconst isDeprecatedHelper = typeof findTabsWithErrors === 'function';\nif (isDeprecatedHelper) console.warn('Remove findTabsWithErrors usage; TabbedForm handles errors internally.');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Don't call internal helpers from TabbedForm; rely on FormTab's built-in error display.","Search the codebase for findTabsWithErrors during react-admin upgrades.","Use FormGroupContextProvider for custom tabbed forms."],"tags":["deprecation","forms","react-admin"],"backgroundTag":"deprecated-api-usage","analyzedSha":"051f511bb0afb5ea565c2d3728bf4dab0a6fa5e0","analyzedAt":"2026-08-30T02:28:14.926Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}