v7.0.0-beta.22

This commit is contained in:
Tanner Linsley 2019-12-02 12:29:46 -07:00
parent 49674a094a
commit 83f889dad5
5 changed files with 19 additions and 15 deletions

View File

@ -1,20 +1,20 @@
{
"dist/index.js": {
"bundled": 96409,
"minified": 46532,
"gzipped": 12274
"bundled": 96393,
"minified": 46534,
"gzipped": 12272
},
"dist/index.es.js": {
"bundled": 95844,
"minified": 46040,
"gzipped": 12164,
"bundled": 95828,
"minified": 46042,
"gzipped": 12160,
"treeshaked": {
"rollup": {
"code": 78,
"import_statements": 21
},
"webpack": {
"code": 11105
"code": 11109
}
}
}

View File

@ -1,3 +1,7 @@
## 7.0.0-beta.22
- Fixed an issue where `useRowState` would crash due to invalid initial state attempting to spread into the new state
## 7.0.0-beta.21
- Removed deprecated `defaultState` export

View File

@ -198,7 +198,7 @@ This library is being built and maintained by me, @tannerlinsley and I am always
#### I'm still using v6, what should I do?
v6 is a great library and is still the default install for `react-table`, however, I do not intend on offering any long-term support for it. If you intend to keep using v6, I recommend maintaining your own fork of the library and keeping it up to date for your version of React.
v6 is a great library and while it is still available for use, I do not intend on offering any long-term support for it. If you intend to keep using v6, I recommend maintaining your own fork of the library and keeping it up to date for your version of React.
#### Where are the docs for the older v6 version?

View File

@ -1,6 +1,6 @@
{
"name": "react-table",
"version": "7.0.0-beta.21",
"version": "7.0.0-beta.22",
"description": "A fast, lightweight, opinionated table and datagrid built on React",
"license": "MIT",
"homepage": "https://github.com/tannerlinsley/react-table#readme",

View File

@ -36,7 +36,7 @@ reducerHandlers[pluginName] = (state, action) => {
...state,
rowState: {
...state.rowState,
[pathKey]: functionalUpdate(value, state.rowState[pathKey]),
[pathKey]: functionalUpdate(value, state.rowState[pathKey] || {}),
},
}
}
@ -71,7 +71,7 @@ function useMain(instance) {
)
const setCellState = React.useCallback(
(rowPath, columnId, updater) => {
(rowPath, columnId, value) => {
return setRowState(
rowPath,
old => {
@ -79,10 +79,10 @@ function useMain(instance) {
...old,
cellState: {
...old.cellState,
[columnId]:
typeof updater === 'function'
? updater(old.cellState[columnId])
: updater,
[columnId]: functionalUpdate(
value,
old.cellState[columnId] || {}
),
},
}
},