Hi,
I’m working on a custom widget in which I use an oh-repeater to list all light items as a list of custom made rows. In each row, I’m trying to add a button that is gonna work as an extender to the properties of the said light in the row (clicking on the button expand the row to have sliders for dimmers and colors).
My current issue is if I make a button with the variable “moreInfo”, all the rows will then expands, not just the row in which the button has been clicked. I then tried to use the “item.loop.label” as the variable name but I’m not sure of the right way to use the current iteration of the item as a variable or if it is doable. I’ve tried many syntaxes but none have worked so far. Is there a way to create a variable that will dynamically change for each loop iteration?
Thanks for the help!
- component: oh-repeater
config:
for: item
sourceType: itemsWithTags
itemTags: Light
slots:
default:
- component: f7-row
config:
slots:
- component: oh-button
config:
action: variable
actionVariable: =loop.item.label
actionVariableValue: more
- component: f7-row
visible: '=(vars.loop.item.label === "more")'