mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 22:15:45 +01:00
Added disabled attribute to DropDown
This commit is contained in:
@@ -7,17 +7,19 @@ type Props = {
|
|||||||
options: string[],
|
options: string[],
|
||||||
optionSelected: string => void,
|
optionSelected: string => void,
|
||||||
preselectedOption?: string,
|
preselectedOption?: string,
|
||||||
className: any
|
className: any,
|
||||||
|
disabled?: boolean
|
||||||
};
|
};
|
||||||
|
|
||||||
class DropDown extends React.Component<Props> {
|
class DropDown extends React.Component<Props> {
|
||||||
render() {
|
render() {
|
||||||
const { options, preselectedOption, className } = this.props;
|
const { options, preselectedOption, className, disabled } = this.props;
|
||||||
return (
|
return (
|
||||||
<div className={classNames(className, "select")}>
|
<div className={classNames(className, "select")}>
|
||||||
<select
|
<select
|
||||||
value={preselectedOption ? preselectedOption : ""}
|
value={preselectedOption ? preselectedOption : ""}
|
||||||
onChange={this.change}
|
onChange={this.change}
|
||||||
|
disabled={disabled}
|
||||||
>
|
>
|
||||||
<option key="" />
|
<option key="" />
|
||||||
{options.map(option => {
|
{options.map(option => {
|
||||||
|
|||||||
Reference in New Issue
Block a user