Using the same disabled effect on dropdowns as on the flat input boxes

master
WolverinDEV 2021-01-22 17:44:18 +01:00
parent 13e0d66420
commit ec5e1e1e9a
1 changed files with 6 additions and 1 deletions

View File

@ -451,7 +451,12 @@ export class Select extends React.Component<SelectProperties, SelectFieldState>
render() {
const disabled = typeof this.state.disabled === "boolean" ? this.state.disabled : typeof this.props.disabled === "boolean" ? this.props.disabled : false;
return (
<div className={(this.props.type === "boxed" ? cssStyle.containerBoxed : cssStyle.containerFlat) + " " + cssStyle["size-normal"] + " " + (this.state.isInvalid ? cssStyle.isInvalid : "") + " " + (this.props.className || "") + " " + cssStyle.noLeftIcon + " " + cssStyle.noRightIcon}>
<div className={
(this.props.type === "boxed" ? cssStyle.containerBoxed : cssStyle.containerFlat) + " " +
cssStyle["size-normal"] + " " + (this.state.isInvalid ? cssStyle.isInvalid : "") + " " +
(this.props.className || "") + " " + cssStyle.noLeftIcon + " " + cssStyle.noRightIcon + " " +
(this.props.disabled ? cssStyle.disabled : "")
}>
{this.props.label ?
<label className={cssStyle["type-static"] + " " + (this.props.labelClassName || "")}>{this.props.label}</label> : undefined}
<select