File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -145,11 +145,16 @@ export default class Input extends Element {
145
145
}
146
146
147
147
render ( ) {
148
- const value = this . getValue ( ) ;
148
+ let value = this . getValue ( ) ;
149
149
const { type, path, originalValue } = this . props ;
150
150
const checked = ( type === 'checkbox' && value )
151
151
|| ( type === 'radio' && value === originalValue ) ;
152
152
153
+ if ( type === 'radio' && originalValue ) {
154
+ value = originalValue ;
155
+ }
156
+
157
+ const isCheckbox = type === 'checkbox' || type === 'radio' ;
153
158
const inputProps = clearProps ( this . props ) ;
154
159
155
160
return (
@@ -161,7 +166,7 @@ export default class Input extends Element {
161
166
onFocus = { this . onFocus }
162
167
onBlur = { this . onBlur }
163
168
onKeyPress = { this . onKeyPress }
164
- checked = { checked || void 0 }
169
+ checked = { isCheckbox ? checked : void 0 }
165
170
value = { value }
166
171
/>
167
172
) ;
You can’t perform that action at this time.
0 commit comments