Using the Radio Group component, if the self.props.radios[0].value = 2
, the component will automatically change the selection to the first radio item when the self.props.value
is changed to 2 (by a script or binding).
I would expect the same to work if self.props.radios[0].value = null
and self.props.value
is changed to null. This does not seem to be the case, however.
This view demonstrates the behavior I'm seeing. Is this desired behavior or was null overlooked?
Example View
{
"custom": {},
"params": {},
"props": {},
"root": {
"children": [
{
"meta": {
"name": "RadioGroup"
},
"position": {
"basis": "35px"
},
"props": {
"index": 1,
"radios": [
{
"selected": false,
"text": "No selection",
"value": null
},
{
"selected": true,
"text": "True",
"value": true
},
{
"selected": false,
"text": "False",
"value": false
}
],
"value": true
},
"type": "ia.input.radio-group"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tself.getSibling(\"RadioGroup\").props.value\u003dTrue"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button"
},
"position": {
"basis": "34px"
},
"props": {
"text": "True"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tself.getSibling(\"RadioGroup\").props.value\u003dFalse"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_0"
},
"position": {
"basis": "34px"
},
"props": {
"text": "False"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tself.getSibling(\"RadioGroup\").props.value\u003dNone"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_1"
},
"position": {
"basis": "34px"
},
"props": {
"text": "No selection"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "32px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"expression": "\"Value: \"+{../RadioGroup.props.value}"
},
"type": "expr"
}
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_0"
},
"position": {
"basis": "32px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"expression": "\"\u0027No selection\u0027 selected: \" +{../RadioGroup.props.radios[0].selected}"
},
"type": "expr"
}
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_1"
},
"position": {
"basis": "32px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"expression": "\"\u0027True\u0027 selected: \" +{../RadioGroup.props.radios[1].selected}"
},
"type": "expr"
}
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_2"
},
"position": {
"basis": "32px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"expression": "\"\u0027False\u0027 selected: \" +{../RadioGroup.props.radios[2].selected}"
},
"type": "expr"
}
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
}