Skip to content

Commit d612131

Browse files
committed
Add value attribute
1 parent 20f8a6c commit d612131

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-select2-wrapper",
3-
"version": "0.0.7",
3+
"version": "0.0.8",
44
"description": "React component for Select2",
55
"main": "lib/components/Select2.js",
66
"scripts": {

src/components/Select2.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default class Select2 extends Component {
5252
{this.props.data.map((item, k) => {
5353
if (typeof item === 'string' ||
5454
((!!item && typeof item === 'object') && Object.prototype.toString.call(item) === '[object String]')) {
55-
return (<option key={'option-' + k}>{item}</option>);
55+
return (<option key={'option-' + k} value={item}>{item}</option>);
5656
}
5757
return (<option key={'option-' + k} value={item.id}>{item.text}</option>);
5858
})}

0 commit comments

Comments
 (0)