Skip to content

Commit

Permalink
Merge pull request #440 from statikbe/KarelJanVanHaute/issue429
Browse files Browse the repository at this point in the history
Add the chip-cleared event to the chip component
  • Loading branch information
janhenckens authored Feb 12, 2025
2 parents 0f87abf + 150483e commit cbbb4f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tailoff/js/components/chip.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class ChipElement {
}

private setTriggerText() {
const text = new DOMParser().parseFromString(this.getTriggerText(), "text/html");
const text = new DOMParser().parseFromString(this.getTriggerText(), 'text/html');
this.triggerTextElement.innerText = text.documentElement.textContent;
}

Expand Down Expand Up @@ -392,6 +392,7 @@ class ChipElement {
this.setTriggerLabel();
}
this.setTriggerState();
this.element.dispatchEvent(new Event('chip-cleared', { bubbles: true }));
}

private escapeAction(event) {
Expand Down

0 comments on commit cbbb4f0

Please sign in to comment.