mirror of
https://github.com/gosticks/react-table.git
synced 2026-08-19 16:30:21 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62cff3d6bc | ||
|
|
057a815337 |
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-table",
|
"name": "react-table",
|
||||||
"version": "5.0.2",
|
"version": "5.0.3",
|
||||||
"description": "A fast, lightweight, opinionated table and datagrid built on React",
|
"description": "A fast, lightweight, opinionated table and datagrid built on React",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://github.com/tannerlinsley/react-table#readme",
|
"homepage": "https://github.com/tannerlinsley/react-table#readme",
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ export default {
|
|||||||
pivotValKey,
|
pivotValKey,
|
||||||
subRowsKey,
|
subRowsKey,
|
||||||
expanderColumnWidth,
|
expanderColumnWidth,
|
||||||
SubComponent
|
SubComponent,
|
||||||
|
page,
|
||||||
|
pageSize
|
||||||
} = this.getResolvedState(nextProps, nextState)
|
} = this.getResolvedState(nextProps, nextState)
|
||||||
|
|
||||||
// Determine Header Groups
|
// Determine Header Groups
|
||||||
@@ -212,13 +214,16 @@ export default {
|
|||||||
resolvedData = groupRecursively(resolvedData, pivotBy)
|
resolvedData = groupRecursively(resolvedData, pivotBy)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const newPages = Math.ceil(resolvedData.length / pageSize)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
resolvedData,
|
resolvedData,
|
||||||
pivotColumn,
|
pivotColumn,
|
||||||
allVisibleColumns,
|
allVisibleColumns,
|
||||||
headerGroups,
|
headerGroups,
|
||||||
allDecoratedColumns,
|
allDecoratedColumns,
|
||||||
hasHeaderGroups
|
hasHeaderGroups,
|
||||||
|
page: (page + 1) > newPages ? newPages - 1 : page
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getSortedData (nextProps, nextState) {
|
getSortedData (nextProps, nextState) {
|
||||||
|
|||||||
Reference in New Issue
Block a user