Tag inputs which have handler applied #2
Closed
vladdeSV
started this conversation in
suggestions
Replies: 1 comment
-
|
This is implemented in pure JavaScript! I did not really understand that I can modify the elements' properties directly. As of now each handled checkbox gets the property |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have not run into this myself, so leaving it as a discussion.
If my group of checkboxes change dynamically, meaning some other library adds or removes checkboxes, there is no real good way to run the code on the entire group and have each checkbox not get duplicate handlers.
An idea would be to tag inputs with eg.
data-checkswipe-handled, and if the code encounters a checkbox with that attribute it won't apply the handlers to it.Beta Was this translation helpful? Give feedback.
All reactions