Skip to main content

ScaffolderRJSFFieldProps

Home > @backstage/plugin-scaffolder-react > ScaffolderRJSFFieldProps

The props for the Field components

Signature:

export interface ScaffolderRJSFFieldProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> extends GenericObjectType, Pick<HTMLAttributes<HTMLElement>, Exclude<keyof HTMLAttributes<HTMLElement>, 'onBlur' | 'onFocus' | 'onChange'>> 

Extends: GenericObjectType, Pick<HTMLAttributes<HTMLElement>, Exclude<keyof HTMLAttributes<HTMLElement>, 'onBlur' | 'onFocus' | 'onChange'>>

Properties

PropertyModifiersTypeDescription
autofocus?boolean(Optional) A boolean value stating if the field should autofocus
disabledbooleanA boolean value stating if the field is disabled
errorSchema?ErrorSchema<T>(Optional) The tree of errors for this field and its children
formContext?F(Optional) The formContext object that you passed to Form
formDataTThe data for this field
hideError?boolean(Optional) A boolean value stating if the field is hiding its errors
idPrefix?string(Optional) To avoid collisions with existing ids in the DOM, it is possible to change the prefix used for ids; Default is root
idSchemaIdSchema<T>The tree of unique ids for every child field
idSeparator?string(Optional) To avoid using a path separator that is present in field names, it is possible to change the separator used for ids (Default is _)
namestringThe unique name of the field, usually derived from the name of the property in the JSONSchema
onBlur(id: string, value: any) => voidThe input blur event handler; call it with the field id and value
onChange(newFormData: T | undefined, es?: ErrorSchema<T>, id?: string) => anyThe field change event handler; called with the updated form data and an optional ErrorSchema
onFocus(id: string, value: any) => voidThe input focus event handler; call it with the field id and value
rawErrorsstring[]An array of strings listing all generated error messages from encountered errors for this field
readonlybooleanA boolean value stating if the field is read-only
registryRegistry<T, S, F>The registry object
required?boolean(Optional) The required status of this field
schemaSThe JSON subschema object for this field
uiSchemaUiSchema<T, S, F>The uiSchema for this field