Fix toast directive: corrected detection of snack bar container.
This commit is contained in:
parent
31ebf4e645
commit
84d85e5519
@ -312,7 +312,7 @@ export class TbSnackBarComponent implements AfterViewInit, OnDestroy {
|
||||
ngAfterViewInit() {
|
||||
if (this.snackBarRef) {
|
||||
this.parentEl = this.data.parent.nativeElement;
|
||||
this.snackBarContainerEl = this.elementRef.nativeElement.parentNode;
|
||||
this.snackBarContainerEl = $(this.elementRef.nativeElement).closest('snack-bar-container')[0];
|
||||
this.snackBarContainerEl.style.position = 'absolute';
|
||||
this.updateContainerRect();
|
||||
this.updatePosition(this.snackBarRef.containerInstance.snackBarConfig);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user