You need to sign in to do that
Don't have an account?
Andrew Taylor 13
Lightning - ui:inputCheckbox checked?
I'm attempting a trailhead challenge, and completely stuck when working with ui:inputCheckbox.
I can't find in the documentation how I can:
a) determine if the checkbox is checked
b) change it from unchecked to checked (or vice versa).
I can't find in the documentation how I can:
a) determine if the checkbox is checked
b) change it from unchecked to checked (or vice versa).
Please take a look at my example. You should be able to fix your issue based off this code.
My component:
As you can see, the attribute is referenced as "item".
In your controller, you will first need to get a reference to "item" and then check the field values. In this case, I set the value to true and update the ui:
Hope this helps!
Happy coding! :-)
Best regards,
Martijn Schwärzer
All Answers
Please take a look at my example. You should be able to fix your issue based off this code.
My component:
As you can see, the attribute is referenced as "item".
In your controller, you will first need to get a reference to "item" and then check the field values. In this case, I set the value to true and update the ui:
Hope this helps!
Happy coding! :-)
Best regards,
Martijn Schwärzer
Happy coding!
http://www.sfdcmonkey.com/2017/02/23/delete-multiple-records-using-checkbox-lightning-component/ (http://www.sfdcmonkey.com/2017/02/23/delete-multiple-records-using-checkbox-lightning-component/)
Hope it's helps :)