mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2024-12-25 00:11:36 +01:00
Refactor pagination condition in RichTable component
This commit is contained in:
parent
66f83b24bd
commit
4b2e47f8f9
|
@ -64,13 +64,15 @@ function RichTable({
|
|||
},
|
||||
});
|
||||
|
||||
const paginationIsNeeded = tableData.length > pageSize && withPagination;
|
||||
|
||||
return (
|
||||
<div className="table-responsive">
|
||||
<table className="table table-hover text-nowrap">
|
||||
<RichTableHeader table={table} flexRender={flexRender} />
|
||||
<RichTableBody table={table} flexRender={flexRender} />
|
||||
</table>
|
||||
{withPagination && (
|
||||
{paginationIsNeeded && (
|
||||
<RichTablePagination
|
||||
table={table}
|
||||
tablePageSize={pageSize}
|
||||
|
|
Loading…
Reference in New Issue
Block a user