@@ -54,7 +54,7 @@ function getFieldComponent<T = any, S extends StrictRJSFSchema = RJSFSchema, F e
5454 const field = uiOptions . field ;
5555 const { fields, translateString } = registry ;
5656 if ( typeof field === 'function' ) {
57- return field as React . FC ;
57+ return field ;
5858 }
5959 if ( typeof field === 'string' && field in fields ) {
6060 return fields [ field ] ;
@@ -162,8 +162,7 @@ function SchemaFieldRender<T = any, S extends StrictRJSFSchema = RJSFSchema, F e
162162
163163 const displayLabel = schemaUtils . getDisplayLabel ( schema , uiSchema , globalUiOptions ) ;
164164
165- // const { __errors, ...fieldErrorSchema } = errorSchema || {}; //TODO - adjust
166- const { __errors } = errorSchema || { } ;
165+ const { __errors, ...fieldErrorSchema } = errorSchema || { } ;
167166 // See #439: uiSchema: Don't pass consumed class names or style to child components
168167 const fieldUiSchema = omit ( uiSchema , [ 'ui:classNames' , 'classNames' , 'ui:style' ] ) ;
169168 if ( UI_OPTIONS_KEY in fieldUiSchema ) {
@@ -181,7 +180,7 @@ function SchemaFieldRender<T = any, S extends StrictRJSFSchema = RJSFSchema, F e
181180 readonly = { readonly }
182181 hideError = { hideError }
183182 autofocus = { autofocus }
184- // errorSchema={fieldErrorSchema}
183+ errorSchema = { fieldErrorSchema }
185184 formContext = { formContext }
186185 rawErrors = { __errors }
187186 />
0 commit comments