Minor update in tasksReducer

This commit is contained in:
Ken Hibino 2020-12-16 07:04:22 -08:00
parent 226cfc3b82
commit eb660f20ce

View File

@ -507,6 +507,15 @@ function tasksReducer(
deadTasks: {
...state.deadTasks,
batchActionPending: true,
data: state.deadTasks.data.map((task) => {
if (!action.taskKeys.includes(task.key)) {
return task;
}
return {
...task,
requestPending: true,
};
}),
},
};
@ -545,6 +554,15 @@ function tasksReducer(
deadTasks: {
...state.deadTasks,
batchActionPending: false,
data: state.deadTasks.data.map((task) => {
if (!action.taskKeys.includes(task.key)) {
return task;
}
return {
...task,
requestPending: false,
};
}),
},
};