On a repeated list, when de user clicks on an item, I give him some alternative options to execute with the data of the current item. However, I can’t find a way to highlight the item so the user is sure on which is he executing the action. Is there a way to highlight the current item?
A noob question here, but I’m struggling with how to change the background color of a list item component with the Set Component Property flow action. These are not repeated items but just a list of 1-5 items. I have a page variable to store the selected item ID and can successfully set this variable in a flow but can’t figure out how to change the color of the component background. The color property isn’t showing up anywhere in the Set Component Property and I’m not clear on the instructions in this thread on how to bind to a variable to get the style>typography>color property I need to set.
Hey there! You won’t be able to set style properties via Set Component Property. Instead the recommended approach is you that you bind the style property for the background color to a variable or a formula.
For example you could create a page variable “selected” that is updated when you select one of the items and then a formula binding for each item’s background color with something like:
IF(pageVars.selected == 1, ‘red’,‘white’)
And then upon clicking the item you’d simply set the pageVars.selected variable to the item’s id (in this example 1).
@Akseli_Virtanen Thanks. Still stuck with a potential noob question. Not really sure how to bind a variable to a style property. I can bind it to the UI element, in this case a list item, but not sure how to bind it to the list items background color. I checked documentation and went through the binding tutorial but I must be missing something. Thanks for your help.
The style bindings still have a bit different UI for bindings, you’ll want to hit the small icon in front of the property name and then the pen icon to edit the value itself. I made a gif below showing how to do this