mirror of
https://github.com/status-im/safe-react.git
synced 2025-02-26 08:25:14 +00:00
add prop to disable pagination in table component
This commit is contained in:
parent
4dc756398f
commit
cd33d04481
@ -162,10 +162,11 @@ class GnoTable<K> extends React.Component<Props<K>, State> {
|
||||
input: classes.white,
|
||||
}
|
||||
|
||||
const sortedData = stableSort(data, getSorting(orderParam, orderByParam, orderProp), fixedParam).slice(
|
||||
page * rowsPerPage,
|
||||
page * rowsPerPage + rowsPerPage,
|
||||
)
|
||||
let sortedData = stableSort(data, getSorting(orderParam, orderByParam, orderProp), fixedParam)
|
||||
|
||||
if (!disablePagination) {
|
||||
sortedData = sortedData.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
|
||||
}
|
||||
|
||||
const emptyRows = rowsPerPage - Math.min(rowsPerPage, data.length - page * rowsPerPage)
|
||||
const isEmpty = size === 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user