]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix broken toast animations & DOM removal
authorMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Fri, 11 Mar 2022 06:36:43 +0000 (22:36 -0800)
committerMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Tue, 5 Apr 2022 20:16:13 +0000 (13:16 -0700)
src-ui/src/app/components/common/toasts/toasts.component.html
src-ui/src/app/components/common/toasts/toasts.component.scss

index 9d4ae6bb6be358c07f0307a66d549253d10b3f27..b79208ebf0ecef3a8973011b5fff95f3f44c179f 100644 (file)
@@ -2,7 +2,7 @@
   *ngFor="let toast of toasts"
   [header]="toast.title" [autohide]="true" [delay]="toast.delay"
   [class]="toast.classname"
-  (hide)="toastService.closeToast(toast)">
+  (hidden)="toastService.closeToast(toast)">
   <p>{{toast.content}}</p>
   <p *ngIf="toast.action"><button class="btn btn-sm btn-outline-secondary" (click)="toastService.closeToast(toast); toast.action()">{{toast.actionName}}</button></p>
 </ngb-toast>
index 4d1c95fce4e0007a9b80b41eec5ee691c25d4d59..d2aaf20b0bdfa411df539260f5f1f41e4b967bab 100644 (file)
@@ -5,3 +5,7 @@
   margin: 0.5em;
   z-index: 1200;
 }
+
+.toast:not(.show) {
+  display: block; // this corrects an ng-bootstrap bug that prevented animations
+}
\ No newline at end of file