diff --git a/.size-snapshot.json b/.size-snapshot.json index ef3bf0c..245b2eb 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -1,13 +1,13 @@ { "dist/index.js": { - "bundled": 108216, - "minified": 51347, - "gzipped": 13498 + "bundled": 108222, + "minified": 51353, + "gzipped": 13489 }, "dist/index.es.js": { - "bundled": 107373, - "minified": 50597, - "gzipped": 13345, + "bundled": 107379, + "minified": 50603, + "gzipped": 13336, "treeshaked": { "rollup": { "code": 80, diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e27d9d..4b169ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 7.0.0-rc.8 + +- Fix an issue where `useResizeColumns` would crash when using the resizer prop getter + ## 7.0.0-rc.7 Removed: diff --git a/examples/absolute-layout/src/App.js b/examples/absolute-layout/src/App.js index 5f28633..fe8d588 100644 --- a/examples/absolute-layout/src/App.js +++ b/examples/absolute-layout/src/App.js @@ -92,19 +92,18 @@ function Table({ columns, data }) {
- {rows.map( - (row, i) => { - prepareRow(row); - return ( -
- {row.cells.map((cell,index) => ( -
- {cell.render('Cell')} -
- ))} -
- )} - )} + {rows.map((row, i) => { + prepareRow(row) + return ( +
+ {row.cells.map((cell, index) => ( +
+ {cell.render('Cell')} +
+ ))} +
+ ) + })}
) diff --git a/examples/column-resizing/yarn.lock b/examples/column-resizing/yarn.lock index fa7e1dc..d4c6c7c 100644 --- a/examples/column-resizing/yarn.lock +++ b/examples/column-resizing/yarn.lock @@ -8087,10 +8087,10 @@ react-scripts@3.0.1: optionalDependencies: fsevents "2.0.6" -react-table@next: - version "7.0.0-alpha.7" - resolved "https://registry.yarnpkg.com/react-table/-/react-table-7.0.0-alpha.7.tgz#0cb6da6f32adb397e68505b7cdd4880d15d73017" - integrity sha512-oXE9RRkE2CFk1OloNCSTPQ9qxOdujgkCoW5b/srbJsBog/ySkWuozBTQkxH1wGNmnSxGyTrTxJqXdXPQam7VAw== +react-table@latest: + version "7.0.0-rc.7" + resolved "https://registry.yarnpkg.com/react-table/-/react-table-7.0.0-rc.7.tgz#1bf3e248cdef22213821c021236e895bdc3cb5d2" + integrity sha512-24Yofwkh822NyCmnpsrChV8SNOCENQWpV4A5f/MzapTi6iwje644Q11/wbLIgJdPnUJJ0/JbhjsDjxlB6yFV7Q== react@^16.8.6: version "16.8.6" diff --git a/src/plugin-hooks/useResizeColumns.js b/src/plugin-hooks/useResizeColumns.js index 276fe22..e887c6e 100644 --- a/src/plugin-hooks/useResizeColumns.js +++ b/src/plugin-hooks/useResizeColumns.js @@ -203,7 +203,7 @@ const useInstanceBeforeDimensions = instance => { const getInstance = useGetLatest(instance) const getResizerPropsHooks = useConsumeHookGetter( - getInstance(), + getInstance().hooks, 'getResizerProps' )