Skip to content

Commit 954715d

Browse files
committed
Merge branch 'master' of github.com:erikras/react-final-form
2 parents c482411 + e981f55 commit 954715d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Field.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ export default class Field extends React.PureComponent<Props, State> {
121121
value = ''
122122
}
123123
const input = { name, value, ...this.handlers }
124+
warning(
125+
!_value || (rest.type === 'radio' && component === 'input'),
126+
'The value prop on Field is ONLY for use with component="input" and type="radio".'
127+
)
124128
if (rest.type === 'checkbox') {
125129
input.checked = !!value
126130
} else if (rest.type === 'radio') {

0 commit comments

Comments
 (0)