Can't get Switch in repeat region to work

I have a bootsrap table and in last column a Switch and a delete button. Each with Onclick even to load an SC action.
I can get the delete button to work but the switch always sends the row id 1. It should pick up the ID of each row it’s in but it’s not.

Capture3 Capture4

Ended up using Checkbox because Switches don’t seem to work in repeat region…

Not sure how did you come up to such a conclusion, but switches are nothing but differently styled checkboxes ... and they do work perfectly fine in repeat regions.
Your issue is that you are using static ids and static for attributes for the swtiches, so all the switches always default to the first one.
You need these both to be dynamic in order to work with dynamic data in a repeat region.

How come checkboxes just work? I am simply inserting them form the elements.
I did suspect the Id have to be dynamic (not sure how to do that) but how come i don’t have to modify the checkboxes.

I switched to this:

chk2

out of the box they work. they look the same to me

You can make ANY attribute dynamic by adding dmx-bind: to it.

dmx-bind:id="'input' + player_id"
dmx-bind:for="'input' + player_id"

I seem what you mean the ‘for’ in the label… that makes sense.
maybe a feature where it detects its in a repeat region? takes the guess work out of it…

thanks!

J

p.s excuse my hasty judgments i dont know what i’m doing!