Fix pagination in Active table

This commit is contained in:
Ken Hibino
2022-03-02 05:45:53 -08:00
parent 834a759680
commit af9c47d038
3 changed files with 9 additions and 2 deletions

View File

@@ -90,6 +90,7 @@ type ReduxProps = ConnectedProps<typeof connector>;
interface Props {
queue: string; // name of the queue
totalTaskCount: number; // total number of active tasks
}
function ActiveTasksTable(props: Props & ReduxProps) {
@@ -251,7 +252,7 @@ function ActiveTasksTable(props: Props & ReduxProps) {
<TablePagination
rowsPerPageOptions={rowsPerPageOptions}
colSpan={columns.length + 1}
count={props.tasks.length}
count={props.totalTaskCount}
rowsPerPage={pageSize}
page={page}
SelectProps={{

View File

@@ -207,7 +207,10 @@ function TasksTable(props: Props & ReduxProps) {
</div>
</div>
<TabPanel value="active" selected={props.selected}>
<ActiveTasksTable queue={props.queue} />
<ActiveTasksTable
queue={props.queue}
totalTaskCount={currentStats.active}
/>
</TabPanel>
<TabPanel value="pending" selected={props.selected}>
<PendingTasksTable