From 2c0c41b0a7ce3f3ecd108b3f266e0e1c751e2b4b Mon Sep 17 00:00:00 2001 From: ddoe8 Date: Tue, 29 Oct 2024 16:59:37 +0100 Subject: [PATCH] fix(angular): provide fix for missing hint and missing detection (#599) Co-authored-by: DDoe --- angular/projects/catalyst-demo/src/app/app.component.html | 1 + core/src/components/cat-tag/cat-tag.tsx | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/angular/projects/catalyst-demo/src/app/app.component.html b/angular/projects/catalyst-demo/src/app/app.component.html index d2ba54cf..40d5f611 100644 --- a/angular/projects/catalyst-demo/src/app/app.component.html +++ b/angular/projects/catalyst-demo/src/app/app.component.html @@ -126,5 +126,6 @@

new datetime picker

[tagCreationChars]="[' ', ',']" [clearable]="true" > + Hint diff --git a/core/src/components/cat-tag/cat-tag.tsx b/core/src/components/cat-tag/cat-tag.tsx index d0bbb627..5049b041 100644 --- a/core/src/components/cat-tag/cat-tag.tsx +++ b/core/src/components/cat-tag/cat-tag.tsx @@ -1,4 +1,4 @@ -import { Component, Host, h, State, Prop, Event, EventEmitter, Listen, Element, Watch } from '@stencil/core'; +import { Component, Element, Event, EventEmitter, h, Host, Listen, Prop, State, Watch } from '@stencil/core'; import { coerceBoolean, coerceNumber } from '../../utils/coerce'; import { CatFormHint, ErrorMap } from '../cat-form-hint/cat-form-hint'; import { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry'; @@ -263,7 +263,7 @@ export class CatTag { } private get hasHint() { - return !!this.hint || this.invalid; + return !!this.hint || !!this.hasSlottedHint || this.invalid; } private get invalid() { @@ -293,6 +293,7 @@ export class CatTag { private deselect(value: string) { this.value = this.value?.filter(element => element !== value); + this.catChange.emit(this.value); } private showErrors() {