1- import React , { PropTypes , createElement } from 'react' ;
1+ import React , { createElement } from 'react' ;
2+ import PropTypes from 'prop-types' ;
23import get from 'lodash/get' ;
3- import isPlainObject from 'lodash/isPlainObject' ;
44import Element from './Element' ;
55import set from './utils/set' ;
66import traverse from './utils/traverse' ;
@@ -35,7 +35,7 @@ export default class Fieldset extends Element {
3535 constructor ( ...args ) {
3636 super ( ...args ) ;
3737
38- this . children = [ ] ;
38+ this . registeredChildren = [ ] ;
3939 }
4040
4141 getIndexes ( ) {
@@ -67,8 +67,8 @@ export default class Fieldset extends Element {
6767 }
6868
6969 notifyChildren ( ) {
70- const { children } = this ;
71- children . forEach ( child => child . originalValueChanged ( ) ) ;
70+ const { registeredChildren } = this ;
71+ registeredChildren . forEach ( child => child . originalValueChanged ( ) ) ;
7272 }
7373
7474 registerChild ( child , name ) {
@@ -78,7 +78,7 @@ export default class Fieldset extends Element {
7878 return ;
7979 }
8080
81- this . children . push ( child ) ;
81+ this . registeredChildren . push ( child ) ;
8282 }
8383
8484 unregisterChild ( child , name ) {
@@ -88,9 +88,9 @@ export default class Fieldset extends Element {
8888 return ;
8989 }
9090
91- const pos = this . children . indexOf ( child ) ;
91+ const pos = this . registeredChildren . indexOf ( child ) ;
9292 if ( pos !== - 1 ) {
93- this . children . splice ( pos , 1 ) ;
93+ this . registeredChildren . splice ( pos , 1 ) ;
9494 }
9595 }
9696
0 commit comments