diff --git a/scm-ui/src/components/forms/Select.js b/scm-ui/src/components/forms/Select.js index 7918d747ec..184359cc11 100644 --- a/scm-ui/src/components/forms/Select.js +++ b/scm-ui/src/components/forms/Select.js @@ -16,6 +16,14 @@ type Props = { class Select extends React.Component { field: ?HTMLSelectElement; + componentDidMount() { + // trigger change after render, if value is null to set it to the first value + // of the given options. + if (!this.props.value && this.field && this.field.value) { + this.props.onChange(this.field.value); + } + } + handleInput = (event: SyntheticInputEvent) => { this.props.onChange(event.target.value); };