Add FormField.getSelectedElement()

This commit is contained in:
Alex Liebowitz 2016-09-20 06:38:46 -04:00
parent 4d34bb1599
commit b90e1d62e0

View file

@ -51,6 +51,9 @@ var FormField = React.createClass({
return this.refs.field.value;
}
},
getSelectedElement: function() {
return this.refs.field.options[this.refs.field.selectedIndex];
},
render: function() {
var warningStyle = Object.assign({}, requiredFieldWarningStyle);
if (this.state.warningState == 'fading') {