I don't think this is specific to the RadioButtonGroup, but when using dynamic routes with react-router, I noticed that if I try to set the value of a RadioButtonGroup in the render method via the "defaultSelected" property, it doesn't update the component underneath.
I am able to change the component by calling setSelectedValue() on the RadioButtonGroup ref in my componentWillReceiveProps() method.
I'm guessing this is expected behavior, but I don't feel I fully understand why. So the property changes in the render method, but it was already drawn, and so it doesn't result in a dom update.
Are there more properties like this? Should it be documented or is there a clear logic behind it? I'm just trying to understand...
@0x80 : Were you able to get a solution to this?
I am closing this issue for now as its really old and there has been no response again from your side so I an guessing that you were able to fix it.
If you still feel it issue exists or if its still not clear to you feel free to leave a comment below and we will try and help you.
Seems that the defaultSelected option is not meant to be dynamically changed, event during component re-rendering.
I think you were looking for the valueSelected option
Most helpful comment
Seems that the
defaultSelectedoption is not meant to be dynamically changed, event during component re-rendering.I think you were looking for the
valueSelectedoption