mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-15 06:55:58 +08:00
feat: show total items count in table (#4453)
This commit is contained in:
parent
824d9aaf85
commit
e977963763
@ -73,12 +73,18 @@ function ResizeTable({
|
|||||||
}
|
}
|
||||||
}, [columns]);
|
}, [columns]);
|
||||||
|
|
||||||
|
const paginationConfig = {
|
||||||
|
hideOnSinglePage: true,
|
||||||
|
showTotal: (total: number, range: number[]): string =>
|
||||||
|
`${range[0]}-${range[1]} of ${total} items`,
|
||||||
|
};
|
||||||
|
|
||||||
return onDragColumn ? (
|
return onDragColumn ? (
|
||||||
<ReactDragListView.DragColumn {...dragColumnParams} onDragEnd={onDragColumn}>
|
<ReactDragListView.DragColumn {...dragColumnParams} onDragEnd={onDragColumn}>
|
||||||
<Table {...tableParams} />
|
<Table {...tableParams} pagination={paginationConfig} />
|
||||||
</ReactDragListView.DragColumn>
|
</ReactDragListView.DragColumn>
|
||||||
) : (
|
) : (
|
||||||
<Table {...tableParams} />
|
<Table {...tableParams} pagination={paginationConfig} />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user