Hi, I have searched for this specific problem and found similar questions/answers I still haven't figured it out so I am really hoping someone could help get me over this roadblock - thanks in advance!
I have listView that scrolls horizontally and in each list column/item I have a container called 'card' which I have saved as a component so it can be used across my app. Within this container it includes:
name text field
description text filed
a row of icons (including a like/heart toggle icon)
To the card component I have added parameters for the name and description and then on the 'results page' I have set the variables for name/description to be populated by an api call (based on a users input).
The response successfully populates the list dynamically so that all the information I want is correctly showing in the list items. My problem then comes with the like icon/functionality:
When I test the app and want to like let's say the 3rd item on my list, when clicking 'like' all other items in that list automatically like. I am aware that this is expected behaviour as a list inherits the icon state dynamically but I also know it is possible to isolate the behaviour so that these icons behave independently of each other. If someone can give me any pointers as to how I achieve that it would be really appreciated?
The end goal is for the following:
1. name and description to populate dynamically creating a list of 'cards' showing the relevant info (this I have working)
2. users being able to like individual 'cards' which will then add the like to the associated document item (this I cannot get working).
I have tried adding a parameter to the toggle icon in the component but at this point I am just guessing/trial and error without getting much further! Hence coming here.
If additional information here would be helpful please let me know and I will happily add it (apologies new to this and while I have learnt a lot so far I have clearly only scratched the surface).
Thanks in advance,
JP