@@ -179,7 +179,7 @@ class ArrayField extends Component {
179179 uiSchema : { } ,
180180 formData : [ ] ,
181181 idSchema : { } ,
182- registry : getDefaultRegistry ( ) ,
182+ registry : null ,
183183 required : false ,
184184 disabled : false ,
185185 readonly : false ,
@@ -203,7 +203,7 @@ class ArrayField extends Component {
203203
204204 onAddClick = event => {
205205 event . preventDefault ( ) ;
206- const { schema, registry , formData } = this . props ;
206+ const { schema, formData , registry = getDefaultRegistry ( ) } = this . props ;
207207 const { definitions } = registry ;
208208 let itemSchema = schema . items ;
209209 if ( isFixedItems ( schema ) && allowAdditionalItems ( schema ) ) {
@@ -291,7 +291,7 @@ class ArrayField extends Component {
291291 disabled,
292292 readonly,
293293 autofocus,
294- registry,
294+ registry = getDefaultRegistry ( ) ,
295295 formContext,
296296 onBlur,
297297 } = this . props ;
@@ -348,9 +348,10 @@ class ArrayField extends Component {
348348 readonly,
349349 autofocus,
350350 onBlur,
351+ registry = getDefaultRegistry ( ) ,
351352 } = this . props ;
352353 const items = this . props . formData ;
353- const { widgets, definitions, formContext } = this . props . registry ;
354+ const { widgets, definitions, formContext } = registry ;
354355 const itemsSchema = retrieveSchema ( schema . items , definitions ) ;
355356 const enumOptions = optionsList ( itemsSchema ) ;
356357 const { widget = "select" , ...options } = {
@@ -385,10 +386,11 @@ class ArrayField extends Component {
385386 readonly,
386387 autofocus,
387388 onBlur,
389+ registry = getDefaultRegistry ( ) ,
388390 } = this . props ;
389391 const title = schema . title || name ;
390392 const items = this . props . formData ;
391- const { widgets, formContext } = this . props . registry ;
393+ const { widgets, formContext } = registry ;
392394 const { widget = "files" , ...options } = getUiOptions ( uiSchema ) ;
393395 const Widget = getWidget ( schema , widget , widgets ) ;
394396 return (
@@ -420,7 +422,7 @@ class ArrayField extends Component {
420422 disabled,
421423 readonly,
422424 autofocus,
423- registry,
425+ registry = getDefaultRegistry ( ) ,
424426 onBlur,
425427 } = this . props ;
426428 const title = schema . title || name ;
@@ -502,8 +504,13 @@ class ArrayField extends Component {
502504 autofocus,
503505 onBlur,
504506 } = props ;
505- const { SchemaField } = this . props . registry . fields ;
506- const { disabled, readonly, uiSchema } = this . props ;
507+ const {
508+ disabled,
509+ readonly,
510+ uiSchema,
511+ registry = getDefaultRegistry ( ) ,
512+ } = this . props ;
513+ const { fields : { SchemaField } } = registry ;
507514 const { orderable, removable } = {
508515 orderable : true ,
509516 removable : true ,
0 commit comments