Removed daisyUI and shadcn copies of core components are imported from core
Detect
- A custom template or widget that takes a template or widget from
@rjsf/daisyuior@rjsf/shadcnthe theme no longer has its own copy of. - Under
@rjsf/daisyui, that is any template other thanFieldTemplate,ObjectFieldTemplate,WrapIfAdditionalTemplate,ArrayFieldTemplate,ArrayFieldItemButtonsTemplate,TitleField,ArrayFieldTitleTemplateandGridTemplate, and any widget other than the checkbox, toggle, select, date, time and rating widgets. See The daisyUI theme renders core's templates and widgets with its classes. - Under
@rjsf/shadcn, that isFieldTemplate,DescriptionField,FieldErrorTemplate,FieldHelpTemplate,MultiSchemaFieldTemplate,ArrayFieldTemplate,ArrayFieldItemTemplateandObjectFieldTemplate. See The shadcn theme renders core's templates with its classes. - On the rendered page, the component your template renders is missing or unstyled.
Change
Import the component from @rjsf/core instead, or read it from registry.templates or registry.widgets so it picks up whatever the form uses:
- const { FieldErrorTemplate } = myThemeTemplates;
+ const { FieldErrorTemplate } = registry.templates;
The core component takes the theme's classes from the classMap in the registry, so it renders styled under either theme.
Verify
- Your custom template or widget builds and renders the core component with the theme's classes.
Also read: