@fundamental-ngx/core 0.58.0-rc.6 → 0.58.0-rc.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -764,6 +764,8 @@ class NotificationConfig {
764
764
  * @default true
765
765
  */
766
766
  this.shouldTrapFocus = true;
767
+ /** Whether to dismiss the notification on router navigation start. */
768
+ this.closeOnNavigation = true;
767
769
  }
768
770
  }
769
771
 
@@ -975,7 +977,7 @@ class NotificationComponent extends AbstractFdNgxClass {
975
977
  _listenAndCloseOnNavigation() {
976
978
  if (this._router && this._notificationRef) {
977
979
  this._router.events
978
- .pipe(filter((event) => event instanceof NavigationStart && this.closeOnNavigation), takeUntilDestroyed(this._destroyRef))
980
+ .pipe(filter((event) => event instanceof NavigationStart && !!this._notificationConfig?.closeOnNavigation), takeUntilDestroyed(this._destroyRef))
979
981
  .subscribe(() => this._notificationRef?.dismiss());
980
982
  }
981
983
  }