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