File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
projects/igniteui-angular/src/lib/buttonGroup Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -460,15 +460,22 @@ export class IgxButtonGroupComponent extends DisplayDensityBase implements After
460460 } ) ;
461461 } ;
462462
463- this . viewButtons . changes . pipe ( takeUntil ( this . queryListNotifier$ ) ) . subscribe ( ( ) => initButtons ( ) ) ;
464- this . templateButtons . changes . pipe ( takeUntil ( this . queryListNotifier$ ) ) . subscribe ( ( ) => initButtons ( ) ) ;
465- initButtons ( ) ;
466-
467- this . _cdr . detectChanges ( ) ;
468-
469463 this . mutationObserver = this . setMutationsObserver ( ) ;
470464
471- this . mutationObserver . observe ( this . _el . nativeElement , this . observerConfig ) ;
465+ this . viewButtons . changes . pipe ( takeUntil ( this . queryListNotifier$ ) ) . subscribe ( ( ) => {
466+ this . mutationObserver . disconnect ( ) ;
467+ initButtons ( ) ;
468+ this . mutationObserver ?. observe ( this . _el . nativeElement , this . observerConfig ) ;
469+ } ) ;
470+ this . templateButtons . changes . pipe ( takeUntil ( this . queryListNotifier$ ) ) . subscribe ( ( ) => {
471+ this . mutationObserver . disconnect ( ) ;
472+ initButtons ( ) ;
473+ this . mutationObserver ?. observe ( this . _el . nativeElement , this . observerConfig ) ;
474+ } ) ;
475+
476+ initButtons ( ) ;
477+ this . _cdr . detectChanges ( ) ;
478+ this . mutationObserver ?. observe ( this . _el . nativeElement , this . observerConfig ) ;
472479 }
473480
474481 /**
You can’t perform that action at this time.
0 commit comments