I have
<input type='radio' name='is_active' value='true' checked={this.props.is_active==true ? true : false}/> Active
<input type='radio' name='is_active' value='false' checked={this.props.is_active==false ? true : false}/> Passive
...
<button>Save</button>
When I reload page radiobutton is checked as it should, but when I try to check another I can't select anything (dot in radiobutton disappears) But when I click save it saves right !!! (value of the last radiobutton pressed). I can't understand.. Maybe someone knows what's wrong ?
you should have state for rendering your html with new values. set your initial state like this (if you're using es6):
also you will need a function to call on button's click, which will change the state:
and finally your html will look like this: