Skip to content

quadrant-newmedia/select_all_checkbox

Repository files navigation

select-all-checkbox

    <qnc-select-all-checkbox selector="...">
        ANYTHING YOU WANT
        <input type="checkbox">
        ANYTHING YOU WANT
    </qnc-select-all-checkbox

Associates the wrapped checkbox with all other checkboxes on page matching selector attribute.

If the wrapped checkbox is clicked, it changes the state of "controlled" checkboxes. If a controlled checkbox is clicked, wrapped checkbox will update (if required).

Known limitations

Does not react to programmatic manipulation of the controlled inputs. If you programmatically manipulate a controlled input and you want the select-all checkbox to update, you must either:

  • some_controlled_input.dispatchEvent(new CustomEvent('input', {bubbles: true}))
  • qnc_select_all_checkbox.render()

Unbreakable guarantee

We promise never to release breaking changes (ie. a new major version). If your project uses select-all-checkbox, you should add it as a PEER dependency. Since we'll never release a new major version, this cannot lead to dependency conflicts. Any package which relies on this should be able to safely use the latest version.

If we want to release changes which would not be backward compatible, we'll release a new/different package instead (and post a notice here, recommending the new package).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published