Disable install button when selected nothing

feature/appm-store/pbac
Jayasanka 6 years ago
parent caa3717dcb
commit b56430feb2

@ -106,9 +106,6 @@ class DeviceInstall extends React.Component {
}),
};
componentDidMount() {
this.fetch();
}

@ -110,7 +110,7 @@ class GroupInstall extends React.Component {
))}
</Select>
<div style={{paddingTop:10, textAlign:"right"}}>
<Button htmlType="button" type="primary" onClick={this.install}>Install</Button>
<Button disabled={value.length===0} htmlType="button" type="primary" onClick={this.install}>Install</Button>
</div>
</div>
);

@ -110,7 +110,7 @@ class RoleInstall extends React.Component {
))}
</Select>
<div style={{paddingTop:10, textAlign:"right"}}>
<Button htmlType="button" type="primary" onClick={this.install}>Install</Button>
<Button disabled={value.length===0} htmlType="button" type="primary" onClick={this.install}>Install</Button>
</div>
</div>
);

@ -86,7 +86,6 @@ class UserInstall extends React.Component {
};
render() {
const {fetching, data, value} = this.state;
return (
@ -110,7 +109,7 @@ class UserInstall extends React.Component {
))}
</Select>
<div style={{paddingTop: 10, textAlign: "right"}}>
<Button htmlType="button" type="primary" onClick={this.install}>Install</Button>
<Button disabled={value.length===0} htmlType="button" type="primary" onClick={this.install}>Install</Button>
</div>
</div>
);

Loading…
Cancel
Save