You need to sign in to do that
Don't have an account?
Vinnie Bacon 20
How does one have a list with checkboxes and determine which is checked in a Lightning Component?
I'm frustrated with the issue of aura:id not being dynamic. I spent hours only to find out this limitation and now need to rethink how to do this entire task.
I have a simple list of Accounts. I want the user to be able to select one or more of these using a checkbox (ui:inputCheckbox). I dynamically created a unique aura:id for each row using the Account's Id. I was going to use component.find to figure out which rows have been checked. But it looks like aura:id can't be built dynamically.
Do I now assume I need to just do this via standard Javascript? I'm assuming there must be a way to do this common task in Lightning. Any ideas?
I have a simple list of Accounts. I want the user to be able to select one or more of these using a checkbox (ui:inputCheckbox). I dynamically created a unique aura:id for each row using the Account's Id. I was going to use component.find to figure out which rows have been checked. But it looks like aura:id can't be built dynamically.
Do I now assume I need to just do this via standard Javascript? I'm assuming there must be a way to do this common task in Lightning. Any ideas?
Sorry for this issue you are facing.
May I suggest you please refer to below link from the stack exchange community which might help.
- https://salesforce.stackexchange.com/questions/262204/how-to-check-if-triggered-checkbox-is-checked-in-lightning
Please let us know if this helps.Thanks,
Nagendra