I'm caught up in a rather weird scenario.
My backend data looks like this,
"channelName": [
"Online",
"Offline"
],
"paramList": [
{
"paramValue": [
"First",
"Second",
"Third"
],
"paramName": "Tier"
},
{
"paramValue": [
"First",
"Second",
"Third"
],
"paramName": "Class"
}
],
I have to display the channels, the tiers and the classes as checkboxes - but, please note that the params - class and tier or dynamic - which means that these names might change in the future. Channel, however is a field and won't change.
My Questions:
- Is it possible to map these dynamically to a
model
? - Is it possible to implement a 'Select All' feature where if everything is selected, the 'Select All' checkbox is selected and the model is updated as
ALL
and not with the individual field names and vice-versa.
P.S: I am trying not to implement the solution where we add another variable in channel as channel name and selected channel : {channelName, selected}.
Aucun commentaire:
Enregistrer un commentaire