Skip to content

Commit

Permalink
fix(angular): provide fix for missing hint and missing detection (#599)
Browse files Browse the repository at this point in the history
Co-authored-by: DDoe <[email protected]>
  • Loading branch information
ddoe8 and DDoe authored Oct 29, 2024
1 parent debcc0a commit 2c0c41b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions angular/projects/catalyst-demo/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,6 @@ <h1>new datetime picker</h1>
[tagCreationChars]="[' ', ',']"
[clearable]="true"
>
<span slot="hint">Hint</span>
</cat-tag>
</form>
5 changes: 3 additions & 2 deletions core/src/components/cat-tag/cat-tag.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 2c0c41b

Please sign in to comment.