diff --git a/estela-web/src/pages/ProjectJobListPage/index.tsx b/estela-web/src/pages/ProjectJobListPage/index.tsx index b9b4dee1..7e6140e8 100644 --- a/estela-web/src/pages/ProjectJobListPage/index.tsx +++ b/estela-web/src/pages/ProjectJobListPage/index.tsx @@ -250,12 +250,10 @@ export class ProjectJobListPage extends Component { - if (count === 0) { - const tableStatus = this.state.tableStatus; - tableStatus[index] = !tableStatus[index]; - this.setState({ tableStatus: tableStatus }); - } + onChangeStatus = (index: number) => { + const tableStatus = this.state.tableStatus; + tableStatus[index] = !tableStatus[index]; + this.setState({ tableStatus: tableStatus }); }; render(): JSX.Element { @@ -620,8 +618,8 @@ export class ProjectJobListPage extends ComponentSTATUS this.onChangeStatus(waiting, waitingJobs.length)} + checked={tableStatus[waiting]} + onChange={() => this.onChangeStatus(waiting)} > @@ -634,8 +632,8 @@ export class ProjectJobListPage extends Component
this.onChangeStatus(queued, queueJobs.length)} + checked={tableStatus[queued]} + onChange={() => this.onChangeStatus(queued)} > @@ -648,8 +646,8 @@ export class ProjectJobListPage extends Component
this.onChangeStatus(running, runningJobs.length)} + checked={tableStatus[running]} + onChange={() => this.onChangeStatus(running)} > @@ -662,8 +660,8 @@ export class ProjectJobListPage extends Component
this.onChangeStatus(completed, completedJobs.length)} + checked={tableStatus[completed]} + onChange={() => this.onChangeStatus(completed)} > @@ -676,8 +674,8 @@ export class ProjectJobListPage extends Component
this.onChangeStatus(stopped, stoppedJobs.length)} + checked={tableStatus[stopped]} + onChange={() => this.onChangeStatus(stopped)} > @@ -690,8 +688,8 @@ export class ProjectJobListPage extends Component
this.onChangeStatus(withError, errorJobs.length)} + checked={tableStatus[withError]} + onChange={() => this.onChangeStatus(withError)} >