[ML] Fixing multi-job action button when jobs are deleting (#41350) (#41397)

This commit is contained in:
James Gowdy 2019-07-17 21:16:10 +01:00 committed by GitHub
parent bdbd2c70a0
commit 4645529eec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,6 +54,7 @@ class MultiJobActionsMenuUI extends Component {
};
render() {
const anyJobsDeleting = this.props.jobs.some(j => j.deleting);
const button = (
<EuiButtonIcon
size="s"
@ -64,7 +65,7 @@ class MultiJobActionsMenuUI extends Component {
defaultMessage: 'Management actions'
})}
color="text"
disabled={(this.canDeleteJob === false && this.canStartStopDatafeed === false)}
disabled={(anyJobsDeleting || (this.canDeleteJob === false && this.canStartStopDatafeed === false))}
/>
);