-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ionCheck and ionUncheck for ion-checkbox #19096
Comments
With Vue, I made it work with the |
Yes, that is kind of what I did with my pull request. |
Hello, thanks for the issue. We have another issue here #20106 to track the bug with the infinite loop on |
Thanks for the issue! This issue is being closed due to the lack of a reply. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. Thank you for using Ionic! |
Feature Request
Ionic version:
[x] 4.x
Describe the Feature Request
I want to be able to trigger something when a checkbox is being checked/unchecked. ionChange does not work in some cases, see additional context below.
Describe Preferred Solution
Extend events on ion-checkbox to have ionCheck and ionUncheck, similar to ionSelect and ionDeselect on ion-radio.
Related Code
Working on a PR at the moment.
Additional Context
Let's say I have a list of items. Those items are custom components with a couple of checkboxes each. The data for this list comes from an observable I subscribed to. I use ionChange to detect if one of those checkboxes is being checked/unchecked and the previously mentioned observable is being triggered. This triggers ionChange again which then triggers the observable which then triggers ionChange... and now I am trapped in a pretty nasty endless loop.
I guess there could be more cases when you do not want do use ionChange to determine if a specific checkbox is being checked/unchecked.
The text was updated successfully, but these errors were encountered: