Warning: The `value` prop supplied to <select> must be a scalar value if `multiple` is false. Check the render method of `ConnectedField`.
See original GitHub issueWhy would this field return the following warning:
Data: “categories”:[{“id”:“41”,“description”:“My First Select Item”},…]
Field:
<Field name="categories" component="select" className="form-control"> {categories.map( category => <option key={category.id} value={category.id}>{category.description}</option> )} </Field>
Warning generated in browser:
Warning: The
valueprop supplied to <select> must be a scalar value ifmultipleis false. Check the render method ofConnectedField.
Probably a good idea to show some of my config for versions:
“dependencies”: { “axios”: “^0.14.0”, “core-js”: “^2.0.0”, “normalize.css”: “^4.0.0”, “react”: “^15.0.0”, “react-bootstrap”: “^0.30.3”, “react-dom”: “^15.0.0”, “react-redux”: “^4.4.5”, “react-router”: “^2.8.1”, “react-widgets”: “^3.4.4”, “redux”: “^3.6.0”, “redux-form”: “^6.1.0”, “redux-promise”: “^0.5.3”, “redux-thunk”: “^2.1.0” }
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:5
Top Related StackOverflow Question
Since it’s not a multiple selection, it shouldn’t be an array. Check your categories data or allow multiple selections.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.