Disable create view when create link is missing

This commit is contained in:
René Pfeuffer
2019-04-10 16:38:56 +02:00
parent 2ada10ab8d
commit 727fd08b3b
5 changed files with 19 additions and 11 deletions

View File

@@ -15,7 +15,8 @@ type Props = {
value?: string,
onChange: (value: string, name?: string) => void,
loading?: boolean,
helpText?: string
helpText?: string,
disabled?: boolean
};
class Select extends React.Component<Props> {
@@ -34,7 +35,7 @@ class Select extends React.Component<Props> {
};
render() {
const { options, value, label, helpText, loading } = this.props;
const { options, value, label, helpText, loading, disabled } = this.props;
const loadingClass = loading ? "is-loading" : "";
@@ -51,6 +52,7 @@ class Select extends React.Component<Props> {
}}
value={value}
onChange={this.handleInput}
disabled={disabled}
>
{options.map(opt => {
return (