@@ -24,13 +24,13 @@ export interface INestedOptionContainer {
2424
2525export type IOptionPathGetter = ( ) => string ;
2626
27- const warnAboutIncompatibleNestedItems = ( containerClassName : string , itemClassName : string , anotherItemClassName : string ) => {
27+ /* const warnAboutIncompatibleNestedItems = (containerClassName: string, itemClassName: string, anotherItemClassName: string) => {
2828 if (console && console.warn) {
2929 console.warn(`In ${containerClassName},
3030 the nested ${itemClassName} and ${anotherItemClassName} components are incompatible.
3131 Ensure that all nested components in the content area match.`);
3232 }
33- } ;
33+ }; */
3434
3535export const _updateNestedItems = (
3636 items : QueryList < { propertyName : string ; className : string ; component : ICollectionNestedOption } > ,
@@ -86,6 +86,18 @@ export abstract class BaseNestedOption implements INestedOptionContainer, IColle
8686 this . _collectionContainerImpl = new CollectionNestedOptionContainerImpl ( this . _setOption . bind ( this ) , this . _filterItems . bind ( this ) ) ;
8787 }
8888
89+ @ContentChildren ( NESTED_ITEM_TOKEN )
90+ set _nestedItems ( value : QueryList < { propertyName : string ; className : string ; component : ICollectionNestedOption } > ) {
91+ _updateNestedItems (
92+ value ,
93+ this . setChildren . bind ( this ) ,
94+ {
95+ componentClassName : this . constructor . name ,
96+ legacyClassNames : null ,
97+ } ,
98+ ) ;
99+ }
100+
89101 protected _optionChangedHandler ( e : any ) {
90102 const fullOptionPath = this . _fullOptionPath ( ) ;
91103
@@ -247,18 +259,6 @@ export interface ICollectionNestedOption {
247259export abstract class CollectionNestedOption extends BaseNestedOption implements ICollectionNestedOption {
248260 _index : number ;
249261
250- @ContentChildren ( NESTED_ITEM_TOKEN )
251- set _nestedItems ( value : QueryList < { propertyName : string ; className : string ; component : ICollectionNestedOption } > ) {
252- _updateNestedItems (
253- value ,
254- this . setChildren . bind ( this ) ,
255- {
256- componentClassName : this . constructor . name ,
257- legacyClassNames : null ,
258- } ,
259- ) ;
260- }
261-
262262 protected _fullOptionPath ( ) {
263263 return `${ this . _getOptionPath ( ) } [${ this . _index } ].` ;
264264 }
0 commit comments