From 68fd89af3cd878b65eb7629f5f500c28ff67f476 Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Tue, 10 Dec 2019 16:34:23 -0700 Subject: [PATCH] Fix props clobbering Fixes #1755 --- .size-snapshot.json | 12 ++++++------ CHANGELOG.md | 1 + src/plugin-hooks/useResizeColumns.js | 10 ++++------ 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.size-snapshot.json b/.size-snapshot.json index 245b2eb..1235e43 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -1,13 +1,13 @@ { "dist/index.js": { - "bundled": 108222, - "minified": 51353, - "gzipped": 13489 + "bundled": 108184, + "minified": 51333, + "gzipped": 13486 }, "dist/index.es.js": { - "bundled": 107379, - "minified": 50603, - "gzipped": 13336, + "bundled": 107341, + "minified": 50583, + "gzipped": 13333, "treeshaked": { "rollup": { "code": 80, diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b169ea..469622b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 7.0.0-rc.8 - Fix an issue where `useResizeColumns` would crash when using the resizer prop getter +- Fix an issue where `useBlockLayout` was clobbering props sent to headers ## 7.0.0-rc.7 diff --git a/src/plugin-hooks/useResizeColumns.js b/src/plugin-hooks/useResizeColumns.js index e887c6e..6994731 100644 --- a/src/plugin-hooks/useResizeColumns.js +++ b/src/plugin-hooks/useResizeColumns.js @@ -192,12 +192,10 @@ const useInstanceBeforeDimensions = instance => { state: { columnResizing }, } = instance - getHeaderProps.push(() => { - return { - style: { - position: 'relative', - }, - } + getHeaderProps.push({ + style: { + position: 'relative', + }, }) const getInstance = useGetLatest(instance)