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() { componentDidMount() {
this.fetch(); this.fetch();
} }

@ -110,7 +110,7 @@ class GroupInstall extends React.Component {
))} ))}
</Select> </Select>
<div style={{paddingTop:10, textAlign:"right"}}> <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>
</div> </div>
); );

@ -110,7 +110,7 @@ class RoleInstall extends React.Component {
))} ))}
</Select> </Select>
<div style={{paddingTop:10, textAlign:"right"}}> <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>
</div> </div>
); );

@ -86,7 +86,6 @@ class UserInstall extends React.Component {
}; };
render() { render() {
const {fetching, data, value} = this.state; const {fetching, data, value} = this.state;
return ( return (
@ -110,7 +109,7 @@ class UserInstall extends React.Component {
))} ))}
</Select> </Select>
<div style={{paddingTop: 10, textAlign: "right"}}> <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>
</div> </div>
); );

Loading…
Cancel
Save