import type { ArrayFieldItemTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils'; import { getTemplate, getUiOptions } from '@rjsf/utils'; /** The `ArrayFieldItemTemplate` component is the template used to render an items of an array. * * @param props - The `ArrayFieldItemTemplateProps` props for the component */ export default function ArrayFieldItemTemplate< T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any, >(props: ArrayFieldItemTemplateProps) { const { children, buttonsProps, displayLabel, hasToolbar, uiSchema, registry } = props; const uiOptions = getUiOptions(uiSchema); const ArrayFieldItemButtonsTemplate = getTemplate<'ArrayFieldItemButtonsTemplate', T, S, F>( 'ArrayFieldItemButtonsTemplate', registry, uiOptions, ); return (
{hasToolbar && (
{hasToolbar && (
)}
)} {children}
); }