Browse Source

Fix toast directive: corrected detection of snack bar container.

pull/4698/head
Igor Kulikov 5 years ago
parent
commit
84d85e5519
  1. 2
      ui-ngx/src/app/shared/components/toast.directive.ts

2
ui-ngx/src/app/shared/components/toast.directive.ts

@ -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…
Cancel
Save