Fire event when checked state changes.

This commit is contained in:
Peter Kaske 2022-04-05 14:53:52 +02:00
parent 49bfcedc72
commit 9983a48880
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@tp/tp-checkbox",
"version": "1.0.1",
"version": "1.0.2",
"description": "",
"main": "tp-checkbox.js",
"scripts": {

View File

@ -90,6 +90,7 @@ class TpCheckbox extends Inert(ControlState(FormElement(LitElement))) {
toggle() {
this.checked = !this.checked;
this.dispatchEvent(new CustomEvent('checked-changed', { detail: this.checked, bubbles: true, composed: true }));
}
get value() {