mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-06 21:45:43 +01:00
Determine branch for which to show changesets via URL
This commit is contained in:
@@ -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>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user