From 517f154aba93e87437d04c8c95bd11d5427a43b8 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Jadda <17564080+pavankjadda@users.noreply.github.com> Date: Fri, 4 Feb 2022 03:16:46 -0500 Subject: [PATCH 1/2] fix(alert): triggers change detection after timeout --- libs/ngxsmart/src/lib/alert/alert.component.ts | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/libs/ngxsmart/src/lib/alert/alert.component.ts b/libs/ngxsmart/src/lib/alert/alert.component.ts index 264bfd0..4090860 100644 --- a/libs/ngxsmart/src/lib/alert/alert.component.ts +++ b/libs/ngxsmart/src/lib/alert/alert.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnChanges, OnInit } from "@angular/core"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit } from "@angular/core"; /** * Boostrap Alert component that can be used to alert messages to the user @@ -11,7 +11,7 @@ import { Component, Input, OnChanges, OnInit } from "@angular/core"; templateUrl: "./alert.component.html", styleUrls: ["./alert.component.scss"] }) -export class AlertComponent implements OnInit, OnChanges { +export class AlertComponent implements OnInit { /** * Type of the BootStrap Alert. Following values are supported. See BootStrap docs for more information *
@@ -47,7 +47,7 @@ export class AlertComponent implements OnInit, OnChanges {
 	 */
 	@Input() dismissTimeout = 5000;
 
-	constructor() {
+	constructor(private cdr: ChangeDetectorRef) {
 	}
 
 	/**
@@ -62,20 +62,11 @@ export class AlertComponent implements OnInit, OnChanges {
 		if (this.dismissOnTimeout) {
 			setTimeout(() => {
 				this.closeAlert();
+				this.cdr.markForCheck();
 			}, this.dismissTimeout);
 		}
 	}
 
-	/**
-	 * Watch for changes in inputs
-	 *
-	 * @author Pavan Kumar Jadda
-	 * @since 12.0.0
-	 */
-	ngOnChanges(): void {
-		// Watch for changes in inputs
-	}
-
 	/**
 	 * Closes BootStrap Alert if not open
 	 *

From 604cd5e65b6841abe22e17ce2efcbeba2a5a6d8d Mon Sep 17 00:00:00 2001
From: Pavan Kumar Jadda <17564080+pavankjadda@users.noreply.github.com>
Date: Fri, 4 Feb 2022 03:18:05 -0500
Subject: [PATCH 2/2] release: bump version to 13.0.5

---
 libs/ngxsmart/package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/ngxsmart/package.json b/libs/ngxsmart/package.json
index 37ebb9e..799c725 100644
--- a/libs/ngxsmart/package.json
+++ b/libs/ngxsmart/package.json
@@ -1,6 +1,6 @@
 {
 	"name": "@ngxsmart/ngxsmart",
-	"version": "13.0.4",
+	"version": "13.0.5",
 	"repository": {
 		"type": "git",
 		"url": "https://github.com/ngxsmart/ngxsmart.git"