Paulo
October 3, 2024, 12:45am
5
Hi @Jake_Slack , welcome to the forum!
Although we don't support accessing child elements from outside of the List View component, we can use State Variables to hold on data that lives within components inside of the List View.
Here are a couple of examples:
Hey @Ricardo_Montoya !
You might try adding an event handler that stores the index of the listview row in a temp state . Any component in your listview should have access to {{ i }} which stores the row index:
[image]
You can then use that temp state to reference any underlying data:
[image]
Note that this is contingent on whether or not the clicked component has a "click" event handler.
[image]
Attached is an example you can import and play around with! Let me know if that works.
master_dā¦
We can definitely create the components programmatically using the Custom Collection view, we just can't nest another one. If we have different pages for each exercise, we should be able to make this work.
Here is an example of a Collection View with 'x' amount of containers based on external data:
If the amount of sets is saved in a State variable :
[Screenshot 2024-04-25 at 9.20.20 AM]
Note: The value could come from user input or data in a table, I'm manually setting it to 4 to keep it sā¦