Fix useResizeColumns bug

This commit is contained in:
Tanner Linsley 2019-12-10 14:58:31 -07:00
parent 08bb50ae48
commit 0c43e19091
5 changed files with 27 additions and 24 deletions

View File

@ -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,

View File

@ -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:

View File

@ -92,19 +92,18 @@ function Table({ columns, data }) {
</div>
<div className="rows" {...getTableBodyProps()}>
{rows.map(
(row, i) => {
prepareRow(row);
return (
<div {...row.getRowProps()} className="row body">
{row.cells.map((cell,index) => (
<div {...cell.getCellProps()} key={index} className="cell">
{cell.render('Cell')}
</div>
))}
</div>
)}
)}
{rows.map((row, i) => {
prepareRow(row)
return (
<div {...row.getRowProps()} className="row body">
{row.cells.map((cell, index) => (
<div {...cell.getCellProps()} key={index} className="cell">
{cell.render('Cell')}
</div>
))}
</div>
)
})}
</div>
</div>
)

View File

@ -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"

View File

@ -203,7 +203,7 @@ const useInstanceBeforeDimensions = instance => {
const getInstance = useGetLatest(instance)
const getResizerPropsHooks = useConsumeHookGetter(
getInstance(),
getInstance().hooks,
'getResizerProps'
)