File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
rest_framework_docs/static/rest_framework_docs/js Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,9 @@ var FieldBoolean = React.createClass({
1616 this . props . onChange ( value ) ;
1717 } ,
1818
19- isChecked : function ( ) {
19+ isChecked : function ( value ) {
2020 if ( this . props . value === undefined ) return ;
21+ return this . props . value === value ;
2122 } ,
2223
2324 render : function ( ) {
@@ -41,15 +42,13 @@ var FieldBoolean = React.createClass({
4142 < input
4243 type = 'radio'
4344 name = { this . props . name }
44- value = 'True'
4545 checked = { this . isChecked ( true ) }
4646 onChange = { this . handleChange . bind ( this , true ) } /> True
4747 </ label >
4848 < label className = 'radio-inline' >
4949 < input
5050 type = 'radio'
5151 name = { this . props . name }
52- value = 'False'
5352 checked = { this . isChecked ( false ) }
5453 onChange = { this . handleChange . bind ( this , false ) } /> False
5554 </ label >
You can’t perform that action at this time.
0 commit comments