[ML] Disabling results buttons on job multi-select (#21209)

This commit is contained in:
James Gowdy 2018-07-25 16:40:49 +01:00 committed by GitHub
parent cd605e5bc1
commit 50b9630748
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 8 deletions

View file

@ -203,10 +203,12 @@ export class JobsList extends Component {
},
};
const selectedJobsClass = (this.props.selectedJobsCount) ? 'jobs-selected' : '';
return (
<EuiBasicTable
itemId="id"
className="jobs-list-table"
className={`jobs-list-table ${selectedJobsClass}`}
items={pageOfItems}
columns={columns}
pagination={pagination}
@ -230,4 +232,5 @@ JobsList.propTypes = {
showDeleteJobModal: PropTypes.func.isRequired,
showStartDatafeedModal: PropTypes.func.isRequired,
refreshJobs: PropTypes.func.isRequired,
selectedJobsCount: PropTypes.number.isRequired,
};

View file

@ -79,13 +79,6 @@
margin-right: 10px;
}
.euiTableRow-isSelected {
.results-button {
color: silver;
pointer-events: none;
}
}
.euiContextMenuItem .euiIcon {
margin-right: 8px;
}
@ -108,3 +101,10 @@
text-align: center;
}
}
.jobs-list-table.jobs-selected {
.results-button {
color: silver;
pointer-events: none;
}
}

View file

@ -280,6 +280,7 @@ export class JobsListView extends Component {
showDeleteJobModal={this.showDeleteJobModal}
showStartDatafeedModal={this.showStartDatafeedModal}
refreshJobs={() => this.refreshJobSummaryList(true)}
selectedJobsCount={this.state.selectedJobs.length}
/>
<EditJobFlyout
setShowFunction={this.setShowEditJobFlyoutFunction}