Skip to main content
Version: Next

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

Property

Modifiers

Type

Description

autofocus?

boolean

(Optional) A boolean value stating if the field should autofocus

disabled

boolean

A 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

formData?

T

(Optional) The 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

idSchema

IdSchema<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 _)

name

string

The unique name of the field, usually derived from the name of the property in the JSONSchema

onBlur

(id: string, value: any) => void

The input blur event handler; call it with the field id and value

onChange

(newFormData: T | undefined, es?: ErrorSchema<T>, id?: string) => any

The field change event handler; called with the updated form data and an optional ErrorSchema

onFocus

(id: string, value: any) => void

The input focus event handler; call it with the field id and value

rawErrors

string[]

An array of strings listing all generated error messages from encountered errors for this field

readonly

boolean

A boolean value stating if the field is read-only

registry

Registry<T, S, F>

The registry object

required?

boolean

(Optional) The required status of this field

schema

S

The JSON subschema object for this field

uiSchema

UiSchema<T, S, F>

The uiSchema for this field