rjsf-team / react-jsonschema-form

A React component for building Web forms from JSON Schema.
https://rjsf-team.github.io/react-jsonschema-form/
Apache License 2.0
14.38k stars 2.19k forks source link

Feat/custom template per field #4352

Open lucasmcht opened 4 weeks ago

lucasmcht commented 4 weeks ago

Fixes https://github.com/rjsf-team/react-jsonschema-form/issues/3695 (Rework of PR https://github.com/rjsf-team/react-jsonschema-form/pull/3881)

Reasons for making this change

Currently, to per-field customize the template, it is necessary to send the function/class of the component in the uiSchema, breaking the JSON nature of the uiSchema. It's not possible to provide just the registration key.

This pull request includes updates to the @rjsf/utils package to allow for per-field customization using string keys from the Registry, as well as updates to the documentation to reflect these changes. Additionally, it simplifies the types in the codebase by introducing a new RJSFBaseProps type.

Feature Enhancements

Documentation Updates

Checklist

heath-freenome commented 3 weeks ago

@lucasmcht Also, can you fix the type errors in the themes?

heath-freenome commented 1 week ago

@lucasmcht Some of your tests are failing