Determine branch for which to show changesets via URL

This commit is contained in:
Philipp Czora
2018-09-17 16:31:19 +02:00
parent 2be854e3d2
commit c5da25a1b4
3 changed files with 25 additions and 22 deletions

View File

@@ -4,15 +4,17 @@ import React from "react";
type Props = {
options: string[],
optionSelected: string => void
optionSelected: string => void,
preselectedOption: string
}
class DropDown extends React.Component<Props> {
render() {
const {options} = this.props;
return <select onChange={this.change}>
const {options, preselectedOption} = this.props;
return <select value={preselectedOption} onChange={this.change}>
{options.map(option => {
return <option key={option} value={option}>{option}</option>
return <option key={option}
value={option}>{option}</option>
})}
</select>
}