We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 22a60de + d4c7b41 commit 180a4dbCopy full SHA for 180a4db
src/components/Select2.js
@@ -62,7 +62,9 @@ export default class Select2 extends Component {
62
((!!item && typeof item === 'object') && Object.prototype.toString.call(item) === '[object String]')) {
63
return (<option key={'option-' + k} value={item}>{item}</option>);
64
}
65
- return (<option key={'option-' + k} value={item.id}>{item.text}</option>);
+
66
+ const { id, text, ...itemParams } = item;
67
+ return (<option key={'option-' + k} value={id} {...itemParams}>{text}</option>);
68
})}
69
</select>
70
);
0 commit comments