I want to create a list with multiple cards, where the selected card is highlighted by displaying an icon. How can I achieve this functionality? I have attached a screenshot for your reference.
-
I dragged a list onto the canvas and mapped the API response to populate it.
-
The list is successfully populated with the API data.
-
I created a JavaScript function that adds a flag to each object, initially set to
falseby default.
-
On clicking a specific card, another JavaScript function updates the flag to
truefor the selected card while setting it tofalsefor the rest. This function executes on theonClickevent of the cards in the list.
-
Finally, I created a BRE condition:
OBJ(flag) == static(true, string), which checks if the flag istrueand makes the icon visible for the selected card.Ensure to reload the list element.
1 Like



