mirror of
https://github.com/gosticks/react-table.git
synced 2026-10-06 07:46:54 +00:00
Feature: Changing defaultSorting now updates the sorting model
This commit is contained in:
+3
-2
@@ -1,7 +1,7 @@
|
||||
import _ from './utils'
|
||||
|
||||
export default {
|
||||
getDataModel (nextProps, nextState) {
|
||||
getDataModel (newState) {
|
||||
const {
|
||||
columns,
|
||||
pivotBy = [],
|
||||
@@ -14,7 +14,7 @@ export default {
|
||||
page,
|
||||
pages,
|
||||
pageSize
|
||||
} = this.getResolvedState(nextProps, nextState)
|
||||
} = newState
|
||||
|
||||
// Determine Header Groups
|
||||
let hasHeaderGroups = false
|
||||
@@ -219,6 +219,7 @@ export default {
|
||||
const newPage = page > newPages ? newPage - 1 : page
|
||||
|
||||
return {
|
||||
...newState,
|
||||
resolvedData,
|
||||
pivotColumn,
|
||||
allVisibleColumns,
|
||||
|
||||
Reference in New Issue
Block a user