@public
interface
BaseItemProps
Props for the base item component.
Import
import {type BaseItemProps} from 'sanity'
Signature
interface BaseItemProps<T> {
children: ReactNode
description: string | undefined
focused?: boolean
index: number
inputId: string
key: string
level: number
onBlur: (event: FocusEvent_2) => void
onFocus: (event: FocusEvent_2) => void
onRemove: () => void
path: Path
readOnly?: boolean
renderDefault: (props: ItemProps) => React.JSX.Element
schemaType: SchemaType
title: string | undefined
validation: FormNodeValidation[]
value: unknown
}
Properties
children: ReactNode
children: ReactNode
The children of the item.
description: string | undefined
description: string | undefined
The description of the item.
focused?: boolean
focused?: boolean
Whether the item is focused.
index: number
index: number
The index of the item.
inputId: string
inputId: string
The ID of the input element.
key: string
key: string
The key of the item.
level: number
level: number
The level of the item.
onBlur: (event: FocusEvent_2) => void
onBlur: (event: FocusEvent_2) => void
The function to call when the item loses focus.
onFocus: (event: FocusEvent_2) => void
onFocus: (event: FocusEvent_2) => void
The function to call when the item receives focus.
onRemove: () => void
onRemove: () => void
The function to call when the item is removed.
path: Path
path: Path
The path of the item.
readOnly?: boolean
readOnly?: boolean
Whether the item is read-only.
renderDefault: (props: ItemProps) => React.JSX.Element
renderDefault: (props: ItemProps) => React.JSX.Element
The function to call to render the default item. See ItemProps
schemaType: SchemaType
schemaType: SchemaType
The schema type of the item.
title: string | undefined
title: string | undefined
The title of the item.
validation: FormNodeValidation[]
validation: FormNodeValidation[]
The validation markers for the item.
value: unknown
value: unknown
The value of the item.