Skip to content

Commit

Permalink
fix #33 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
wkpark committed Oct 15, 2023
1 parent 1305ed4 commit 887d73e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions javascript/active.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ onUiUpdate(() => {
e.stopPropagation();
});

span.addEventListener('click', (e) => {
checkbox.checked = !checkbox.checked;
badge.checked = checkbox.checked;
triggerEvent(checkbox, 'change');
e.stopPropagation();
});

badge.className = checkbox.className;
badge.classList.add('primary');
span.insertBefore(badge, span.firstChild);
Expand Down

0 comments on commit 887d73e

Please sign in to comment.