Compare commits

...
10 Commits
Author SHA1 Message Date
Tanner Linsley 42b78d52ca v7.0.0-rc.8 2019-12-10 16:35:19 -07:00
Tanner Linsley 68fd89af3c Fix props clobbering
Fixes #1755
2019-12-10 16:34:23 -07:00
Tanner Linsley 0c43e19091 Fix useResizeColumns bug 2019-12-10 14:58:31 -07:00
size-plugin[bot]andGitHub 08bb50ae48 🧑🏻‍🤝‍🧑🏻 🔔 update sizes-es.json 👍 2019-12-10 19:44:09 +00:00
size-plugin[bot]andGitHub 0fcc9e608c 🇰🇪 🍐 update sizes-cjs.json 👍 2019-12-10 19:44:08 +00:00
Tanner Linsley 15125f9326 Update useColumnVisibility.js 2019-12-10 12:42:19 -07:00
Tanner Linsley b8701f260a Update CHANGELOG.md 2019-12-10 12:33:44 -07:00
Tanner Linsley 70bdd272e5 Merge branch 'master' of https://github.com/react-tools/react-table 2019-12-10 11:59:39 -07:00
size-plugin[bot]andGitHub 5ad648d9da 🇧🇸 👮🏽‍♂️ update sizes-es.json 👍 2019-12-10 18:58:59 +00:00
size-plugin[bot]andGitHub 117dc54439 💻 🙍🏾‍♀️ update sizes-cjs.json 👍 2019-12-10 18:58:58 +00:00
9 changed files with 80 additions and 38 deletions
+6 -6
View File
@@ -1,13 +1,13 @@
{
"dist/index.js": {
"bundled": 108216,
"minified": 51347,
"gzipped": 13498
"bundled": 108184,
"minified": 51333,
"gzipped": 13486
},
"dist/index.es.js": {
"bundled": 107373,
"minified": 50597,
"gzipped": 13345,
"bundled": 107341,
"minified": 50583,
"gzipped": 13333,
"treeshaked": {
"rollup": {
"code": 80,
+8 -3
View File
@@ -1,3 +1,8 @@
## 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
Removed:
@@ -23,9 +28,9 @@ Modified:
- Converted almost all usages of `instanceRef.current` to use `useGetLatest(instanceRef.current)` to help with avoiding memory leaks and to be more terse.
- Converted all previous prop-getter definitions to use the new `makePropGetter`
- Reorganized plugin hooks to declare as many hooks in the main plugin function as opposed to in the `useInstance` hook.
- Changed the `useInstanceBeforeDimensions` hook to be a `loopHooks` call instead of a reducer. An error will be thrown now if any of these hook functions returns a value (to discourage mutation of the instance)
- Changed the `useInstance` hook to be a `loopHooks` call instead of a reducer. An error will be thrown now if any of these hook functions returns a value (to discourage mutation of the instance)
- Change the `prepareRow` hook to be a `loopHooks` call instead of a reducer. An error will be thrown now if any of these hook functions returns a value (to discourage mutation of the row)
- Changed the `useInstanceBeforeDimensions` hook to be a `loopHooks` call instead of a reducer. An error will be thrown now if any of these hook functions returns a value (to encourage mutation of the instance)
- Changed the `useInstance` hook to be a `loopHooks` call instead of a reducer. An error will be thrown now if any of these hook functions returns a value (to encourage mutation of the instance)
- Change the `prepareRow` hook to be a `loopHooks` call instead of a reducer. An error will be thrown now if any of these hook functions returns a value (to encourage mutation of the row)
## 7.0.0-rc.6
+12 -13
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>
)
+4 -4
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"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "react-table",
"version": "7.0.0-rc.7",
"version": "7.0.0-rc.8",
"description": "Hooks for building lightweight, fast and extendable datagrids for React",
"license": "MIT",
"homepage": "https://github.com/tannerlinsley/react-table#readme",
+20
View File
@@ -1,4 +1,24 @@
[
{
"timestamp": 1576007021431,
"files": [
{
"filename": "index.js",
"size": 22643,
"delta": -7
}
]
},
{
"timestamp": 1576004320856,
"files": [
{
"filename": "index.js",
"size": 22650,
"delta": 30
}
]
},
{
"timestamp": 1576003432935,
"files": [
+20
View File
@@ -1,4 +1,24 @@
[
{
"timestamp": 1576007027792,
"files": [
{
"filename": "index.es.js",
"size": 22461,
"delta": -7
}
]
},
{
"timestamp": 1576004327554,
"files": [
{
"filename": "index.es.js",
"size": 22468,
"delta": 30
}
]
},
{
"timestamp": 1576003439933,
"files": [
+4 -4
View File
@@ -14,8 +14,8 @@ actions.setHiddenColumns = 'setHiddenColumns'
actions.toggleHideAllColumns = 'toggleHideAllColumns'
export const useColumnVisibility = hooks => {
hooks.getToggleHiddenProps = [defualtGetToggleHiddenProps]
hooks.getToggleHideAllColumnsProps = [defualtGetToggleHideAllColumnsProps]
hooks.getToggleHiddenProps = [defaultGetToggleHiddenProps]
hooks.getToggleHideAllColumnsProps = [defaultGetToggleHideAllColumnsProps]
hooks.stateReducers.push(reducer)
hooks.useInstanceBeforeDimensions.push(useInstanceBeforeDimensions)
@@ -28,7 +28,7 @@ export const useColumnVisibility = hooks => {
useColumnVisibility.pluginName = 'useColumnVisibility'
const defualtGetToggleHiddenProps = (props, instance, column) => [
const defaultGetToggleHiddenProps = (props, instance, column) => [
props,
{
onChange: e => {
@@ -42,7 +42,7 @@ const defualtGetToggleHiddenProps = (props, instance, column) => [
},
]
const defualtGetToggleHideAllColumnsProps = (props, instance) => [
const defaultGetToggleHideAllColumnsProps = (props, instance) => [
props,
{
onChange: e => {
+5 -7
View File
@@ -192,18 +192,16 @@ const useInstanceBeforeDimensions = instance => {
state: { columnResizing },
} = instance
getHeaderProps.push(() => {
return {
style: {
position: 'relative',
},
}
getHeaderProps.push({
style: {
position: 'relative',
},
})
const getInstance = useGetLatest(instance)
const getResizerPropsHooks = useConsumeHookGetter(
getInstance(),
getInstance().hooks,
'getResizerProps'
)