Voting: 
Vote up!
0 Votes
1 Replies
Unanswered

Switch widget on each segmet row

Question asked by Avisha Seth on Feb 22, 2017 05:08 EST

Is there a solution for using switch widget on each row of segment but with separate onClicks for switch and row ? We have a requirement to create a UI (screenshot attached) -  each item/row having at least 2 rows, 1st row – 2 columns (lable and switch), 2nd row – one column (label). The segment would be used inside a flexScrollContainer. The number of rows is dynamic. The row click would lead to a new screen whereas the switch onClick will perform only on-off of switch. Post the click on switch, the focus should remain on the same row. We do have a workaround for implementing this but wanted to know if there is a standard way possible. Please advice.

Vote up!
0 votes
Vote down!

You could try and pass it to one function with the row context:

for example

function frmName_onSegSetSwitch(context){

//do something based on which context

if(context.name == "somename"){

//do this

}else{

//do that

}

}

Replied by: Feb 22, 2017 06:01 EST