-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
bugneeds triageInitial label given, to be assigned correct labels and assignedInitial label given, to be assigned correct labels and assigned
Description
Prerequisites
- I have searched the existing issues
- I understand that providing a SSCCE example is tremendously useful to the maintainers.
- I have read the documentation
- Ideally, I'm providing a sample JSFiddle, Codesandbox.io or preferably a shared playground link demonstrating the issue.
What theme are you using?
core
Version
5.20.0
Current Behavior
I tried to add a simple form to my React app. I have some custom widgets and templates imported into it. This is the error I get while trying to build the project:
This is how I export my templates:
export const jsonFormTemplates: FormProps['templates'] = {
TitleFieldTemplate: CustomTitleTemplate,
FieldTemplate: CustomFieldTemplate,
DescriptionFieldTemplate: CustomDescriptionTemplate,
ObjectFieldTemplate: CustomObjectFieldTemplate,
FieldErrorTemplate: CustomFieldErrorTemplate,
}
And my widgets:
export const JsonFormWidgets: RegistryWidgetsType = {
TextWidget: CustomTextWidget,
SelectWidget: CustomSelectWidget,
CheckboxWidget: CustomCheckboxWidget,
}
These exported variables are simply given to the widgets and templates props of the Form component.
None of the widgets or templates use the @rjsf/core component, and when I remove these imports the project builds. So I need some help to understand what went wrong. I can upload everything to CodeSandbox if it's necessary.
Expected Behavior
The project should build without any issues.
Steps To Reproduce
- Create simple NextJS app with Shadcn UI componetnts
- Add RJSF packages and create widgets, templates
- Import templates and widgets, use them in a Form
- Try to build the project
Environment
- OS: MacOS 14.4.1 (23E224)
- Node: v22.4.1.
- npm: 10.8.1
Anything else?
No response
Metadata
Metadata
Assignees
Labels
bugneeds triageInitial label given, to be assigned correct labels and assignedInitial label given, to be assigned correct labels and assigned