Fire event when checked state changes.
This commit is contained in:
parent
49bfcedc72
commit
9983a48880
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tp/tp-checkbox",
|
"name": "@tp/tp-checkbox",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "tp-checkbox.js",
|
"main": "tp-checkbox.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -90,6 +90,7 @@ class TpCheckbox extends Inert(ControlState(FormElement(LitElement))) {
|
|||||||
|
|
||||||
toggle() {
|
toggle() {
|
||||||
this.checked = !this.checked;
|
this.checked = !this.checked;
|
||||||
|
this.dispatchEvent(new CustomEvent('checked-changed', { detail: this.checked, bubbles: true, composed: true }));
|
||||||
}
|
}
|
||||||
|
|
||||||
get value() {
|
get value() {
|
||||||
|
Loading…
Reference in New Issue
Block a user