You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importCheckboxfrom'@19h47/checkbox';const$checkbox=document.querySelectorAll('[role="checkbox"]');constcheckbox=newCheckbox($checkbox);checkbox.init();checkbox.$input.addEventListener('activate',event=>{const{target: { value },}=event;console.log(value);// Current activate value});
Deactivate
importCheckboxfrom'@19h47/checkbox';const$checkbox=document.querySelectorAll('[role="checkbox"]');constcheckbox=newCheckbox($checkbox);checkbox.init();checkbox.$input.addEventListener('deactivate',event=>{const{target: { value },}=event;console.log(value);// Current deactivate value});
CheckboxGroup
The CheckboxGroup is a wrapper class around Checkbox.
When a user clicks a checkbox, holds Shift, and then clicks another checkbox a few rows down, all the checkboxes inbetween those two checkboxes should be checked.