Skip to content

Commit 9b7e85b

Browse files
committed
fix(dip-8-switch): fire an event on switch change
1 parent a59794a commit 9b7e85b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/dip-switch-8-element.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export class DipSwitch8Element extends LitElement {
3232
*/
3333
private toggleSwitch(index: number) {
3434
this.values[index] = this.values[index] ? 0 : 1;
35+
this.dispatchEvent(new InputEvent('switch-change', { detail: index }));
3536
this.requestUpdate(); // force lit to render again
3637
}
3738

0 commit comments

Comments
 (0)