feat: show total items count in table (#4453)

This commit is contained in:
Yunus M 2024-01-29 18:21:51 +05:30 committed by GitHub
parent 824d9aaf85
commit e977963763
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,12 +73,18 @@ function ResizeTable({
}
}, [columns]);
const paginationConfig = {
hideOnSinglePage: true,
showTotal: (total: number, range: number[]): string =>
`${range[0]}-${range[1]} of ${total} items`,
};
return onDragColumn ? (
<ReactDragListView.DragColumn {...dragColumnParams} onDragEnd={onDragColumn}>
<Table {...tableParams} />
<Table {...tableParams} pagination={paginationConfig} />
</ReactDragListView.DragColumn>
) : (
<Table {...tableParams} />
<Table {...tableParams} pagination={paginationConfig} />
);
}