Select a dynamic card view for only one

The logic is you must have IDs of all card view in a list. So upon selecting an item
First set all the IDs into white and the clicked component id alone to red

Try this logic just by altering your codes