@rjsf/utils
Advanced tools
Changelog
6.0.0-beta.7
LayoutGridField
when the 'name' field is missing in the grid schema for a componentChangelog
6.0.0-beta.6
Field
type to add the optional TEST_IDS?: TestIdShape
prop to it to support exposing the TEST_IDS
static prop on LayoutGridField
, LayoutHeaderField
and LayoutMultiSchemaField
for external usersChangelog
6.0.0-beta.5
6.0.0-beta
to ^6.0.0-beta
to avoid npm install
dependency resolution issuesChangelog
6.0.0-beta.4
6
to 6.0.0-beta
to avoid npm install
dependency resolution issuesChangelog
6.0.0-beta.3
^6.0.0-beta.x
to 6
to avoid npm install
dependency resolution issuesChangelog
6.0.0-beta.2
DescriptionField
to render the description
using the RichDescription
fieldDescriptionField
to render the description
using the RichDescription
fieldRichDescription
component, refactored from SchemaField
to support Rich Text descriptions in Markdown formatDescriptionField
to render the description
using the RichDescription
fieldDescriptionField
to render the description
using the RichDescription
fieldFieldTemplate
to move the checkbox implementation into the CheckboxWidget
adding the description
for checkboxespackage.json
to make the package publishableDaisyUIFrameProvider
to extract the bulk of the code into DaisyUIFrameComponent
to add a useEffect()
with a cleanup to remove the tailwind stylesDescriptionField
to render the description
using the RichDescription
fieldDescriptionField
to render the description
using the RichDescription
fieldDescriptionField
to render the description
using the RichDescription
fieldCheckboxField
to remove the checkbox
class that breaks the UIDescriptionField
to render the description
using the RichDescription
fieldDescriptionField
to render the description
using the RichDescription
fielddescription
field in field props to be a string | ReactElement
and added enableMarkdownInDescription
to the GlobalUISchemaOptions
interfacesnapshot-tests
to disable getTestId()
for snapshots and updated the formTests.tsx
to add tests for rich text descriptions for generic fields and the CheckboxWidget
uiSchema.md
to document new enableMarkdownInDescription
propplayground
to move daisyui
theme choice after chakra-ui
and to stop freezing the samples to avoid an AJV
validation issue
validator
from the examples.ts
to fix #4605Changelog
6.0.0-beta.1
ArrayFieldItemTemplate
to use the new ArrayFieldItemButtonsTemplate
ArrayFieldTemplate
, ObjectFieldTemplate
, and WrapIfAdditionalTemplate
to a unique id using the buttonId()
function and adding consistent marker classesGridTemplate
component, adding it to the templates
for the themeantd
ArrayFieldItemTemplate
to replace Button.Group
with Space.Compact
since Button.Group
is deprecated in antd
version 5@ant-design/icon@5
Bootstrap 3
classes from the SchemaField
and added rjsf-
prefix to marker classes, thereby changing theme FieldTemplate
className prop output and associated snapshots@chakra-ui/icon
in favor of lucide-react
ArrayFieldItemTemplate
to use the new ArrayFieldItemButtonsTemplate
ArrayFieldTemplate
, ObjectFieldTemplate
, and WrapIfAdditionalTemplate
to a unique id using the buttonId()
function and adding consistent marker classesGridTemplate
component, adding it to the templates
for the themeBootstrap 3
classes from the SchemaField
and added rjsf-
prefix to marker classes, thereby changing theme FieldTemplate
className prop output and associated snapshotsArrayField
to provide the buttonsProps
to the ArrayFieldItemTemplateType
ArrayFieldItemButtonsTemplate
component as a refactor of all the common buttons code from all the ArrayFieldItemTemplate
implementations, adding a unique id using the buttonId()
functionArrayFieldItemTemplate
to use the new ArrayFieldItemButtonsTemplate
ArrayFieldTemplate
, ObjectFieldTemplate
, and WrapIfAdditionalTemplate
to a unique id using the buttonId()
function and adding consistent marker classesGridTemplate
component, adding it to the templates
for the themeLayoutGridField
, LayoutMultiSchemaField
and LayoutHeaderField
fields, adding them to the fields
listschema.enumNames
and uiSchema.classNames
as well as the deprecated acceptcharset
prop on Form
Bootstrap 3
classes from the SchemaField
to the WrapIfAdditionalTemplate
, thereby affecting all the other themes, fixing #2280rjsf-
prefix onto the following marker classes used in the fields and templates:
field
, field-<schema.type>
, field-error
, field-hidden
, field-array
, field-array-of-<schema.type>
, field-array-fixed-items
, array-item
, config-error
, array-item-add
, array-item-copy
, array-item-move-down
, array-item-move-up
, array-item-remove
, object-property-expand
patternProperties
#1944fluentui-rc
ArrayFieldItemTemplate
to use the new ArrayFieldItemButtonsTemplate
ArrayFieldTemplate
, ObjectFieldTemplate
, and WrapIfAdditionalTemplate
to a unique id using the buttonId()
function and adding consistent marker classesGridTemplate
component, adding it to the templates
for the themeBootstrap 3
classes from the SchemaField
and added rjsf-
prefix to marker classes, thereby changing theme FieldTemplate
className prop output and associated snapshotsmui
ArrayFieldItemTemplate
to use the new ArrayFieldItemButtonsTemplate
ArrayFieldTemplate
, ObjectFieldTemplate
, and WrapIfAdditionalTemplate
to a unique id using the buttonId()
function and adding consistent marker classesGrid2
instead of the deprecated Grid
GridTemplate
component, adding it to the templates
for the themeBootstrap 3
classes from the SchemaField
and added rjsf-
prefix to marker classes, thereby changing theme FieldTemplate
className prop output and associated snapshotsArrayFieldItemTemplate
to use the new ArrayFieldItemButtonsTemplate
ArrayFieldTemplate
, ObjectFieldTemplate
, and WrapIfAdditionalTemplate
to a unique id using the buttonId()
function and adding consistent marker classesGridTemplate
component, adding it to the templates
for the themeBootstrap 3
classes from the SchemaField
and added rjsf-
prefix to marker classes, thereby changing theme FieldTemplate
className prop output and associated snapshotssemantic-ui-react
ArrayFieldItemTemplateType
to extract out all the button related props to ArrayFieldItemButtonsTemplateType
, adding buttonsProps: ArrayFieldItemButtonsTemplateType
as a new prop
ArrayFieldTemplateItemType
that points to ArrayFieldItemTemplateType
for backwards compatibilityGridTemplateProps
typeTemplatesType
:
ArrayFieldItemButtonsTemplate: ComponentType<ArrayFieldItemButtonsTemplateType<T, S, F>>;
GridTemplate: ComponentType<GridTemplateProps>
SchemaUtilsType
to add new validator-based functions to the interfacebuttonId<T>(id: IdSchema<T> | string, btn: 'add' | 'copy' | 'moveDown' | 'moveUp' | 'remove')
: used to generate consistent ids for RJSF buttonsgetTestIds(): TestIdShape
: Returns an object of test IDs that can only be used in test mode, helpful for writing unit tests for React componentshashObject(object: unknown): string
: Stringifies an object
and returns the hash of the resulting stringhashString(string: string): string
: Hashes a string into hex formatlookupFromFormContext<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(regOrFc: Registry<T, S, F> | Registry<T, S, F>['formContext'], toLookup: string, fallback?: unknown)
: Given a React JSON Schema Form registry or formContext object, return the value associated with toLookup
findFieldInSchema<T = undefined, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, rootSchema: S, path: string | string[], schema: S, formData?: T, experimental_customMergeAllOf?: Experimental_CustomMergeAllOf<S>): FoundFieldType<S>
: Finds the field specified by the path
within the root or recursed schema
findSelectedOptionInXxxOf<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, rootSchema: S, schema: S, fallbackField: string,xxx: 'anyOf' | 'oneOf', formData?: T, experimental_customMergeAllOf?: Experimental_CustomMergeAllOf<S>): S | undefined
: Finds the option that matches the selector field in the schema
or undefined if nothing is selectedgetFromSchema<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, rootSchema: S, schema: S, path: string | string[], defaultValue: T | S, experimental_customMergeAllOf?: Experimental_CustomMergeAllOf<S>): T | S
: Helper that acts like lodash's get
but additionally retrieves $ref
s as needed to get the path for schemasschema.enumNames
from getOptionsList()
while switching the order of its generic typesgetMatchingOption()
and mergeValidationData()
from the library export and the SchemaUtilsType
interfacetoErrorList()
function from the ValidatorType
interfaceRJSF_ADDITONAL_PROPERTIES_FLAG
constantWrapIfAdditionalTemplateProps
to include hideError
and rawErrors
in support of moving Bootstrap 3
marker classes out of SchemaField
patternProperties
#1944getTemplate()
to allow per-field customization using string key from Registry
, fixing #3695.TemplatesType
to allow for a string key to be used to reference a custom template in the Registry
, fixing #3695getTemplate()
functionalitytoErrorList()
function from the validator implementationsfluent-ui
themecustom-templates.md
documentation for the changes to the ArrayFieldTemplateItem
and add the two new templatesutility-functions.md
documentation to add the buttonId()
functionv6.x upgrade guide.md
documentationplayground
to add a Layout Grid
example and made the selected example now be part of the shared exportpeerDependencies
to change minimal React
support to >=18
patternProperties
advanced-customization/custom-templates
with the new feature.Changelog
5.24.9
slotProps.htmlInput
, which does not work in MUI v5.