Merged in feature/disable_dropdown (pull request #148)

Added disabled attribute to DropDown
This commit is contained in:
Sebastian Sdorra
2019-01-09 09:21:35 +00:00

View File

@@ -7,17 +7,19 @@ type Props = {
options: string[],
optionSelected: string => void,
preselectedOption?: string,
className: any
className: any,
disabled?: boolean
};
class DropDown extends React.Component<Props> {
render() {
const { options, preselectedOption, className } = this.props;
const { options, preselectedOption, className, disabled } = this.props;
return (
<div className={classNames(className, "select")}>
<select
value={preselectedOption ? preselectedOption : ""}
onChange={this.change}
disabled={disabled}
>
<option key="" />
{options.map(option => {