From ecf3f6a10877f54a592c3f6698c52a5ee79cdfda Mon Sep 17 00:00:00 2001 From: Kalutka Zhenya Date: Wed, 19 May 2021 12:46:49 +0300 Subject: [PATCH 1/3] Fixed error message in Led Indicator --- ui-ngx/src/app/shared/components/snack-bar-component.html | 2 +- ui-ngx/src/app/shared/components/toast.directive.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/shared/components/snack-bar-component.html b/ui-ngx/src/app/shared/components/snack-bar-component.html index a88ad74c27..f158555916 100644 --- a/ui-ngx/src/app/shared/components/snack-bar-component.html +++ b/ui-ngx/src/app/shared/components/snack-bar-component.html @@ -25,5 +25,5 @@ 'info-toast': notification.type === 'info' }">
- + diff --git a/ui-ngx/src/app/shared/components/toast.directive.ts b/ui-ngx/src/app/shared/components/toast.directive.ts index addecfb57a..9823e91632 100644 --- a/ui-ngx/src/app/shared/components/toast.directive.ts +++ b/ui-ngx/src/app/shared/components/toast.directive.ts @@ -356,7 +356,8 @@ export class TbSnackBarComponent implements AfterViewInit, OnDestroy { } } - action(): void { + action(event): void { + event.stopPropagation(); if (this.snackBarRef) { this.snackBarRef.dismissWithAction(); } else { From 920976003675c072d8fc3d56e614948e304e8387 Mon Sep 17 00:00:00 2001 From: Kalutka Zhenya Date: Thu, 20 May 2021 11:47:17 +0300 Subject: [PATCH 2/3] Refactoring --- ui-ngx/src/app/shared/components/toast.directive.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/shared/components/toast.directive.ts b/ui-ngx/src/app/shared/components/toast.directive.ts index 9823e91632..0294e3e671 100644 --- a/ui-ngx/src/app/shared/components/toast.directive.ts +++ b/ui-ngx/src/app/shared/components/toast.directive.ts @@ -256,6 +256,7 @@ import { animate, } from '@angular/animations'; import { onParentScrollOrWindowResize } from '@core/utils'; +import ClickEvent = JQuery.ClickEvent; export const toastAnimations: { readonly showHideToast: AnimationTriggerMetadata; @@ -356,7 +357,7 @@ export class TbSnackBarComponent implements AfterViewInit, OnDestroy { } } - action(event): void { + action(event: MouseEvent): void { event.stopPropagation(); if (this.snackBarRef) { this.snackBarRef.dismissWithAction(); From a69bfd4d6cff71d3cd9712c901e82e614e87b3f9 Mon Sep 17 00:00:00 2001 From: Kalutka Zhenya Date: Thu, 20 May 2021 11:50:02 +0300 Subject: [PATCH 3/3] clean import --- ui-ngx/src/app/shared/components/toast.directive.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/ui-ngx/src/app/shared/components/toast.directive.ts b/ui-ngx/src/app/shared/components/toast.directive.ts index 0294e3e671..b85b115d61 100644 --- a/ui-ngx/src/app/shared/components/toast.directive.ts +++ b/ui-ngx/src/app/shared/components/toast.directive.ts @@ -256,7 +256,6 @@ import { animate, } from '@angular/animations'; import { onParentScrollOrWindowResize } from '@core/utils'; -import ClickEvent = JQuery.ClickEvent; export const toastAnimations: { readonly showHideToast: AnimationTriggerMetadata;