Commit Graph

63 Commits

Author SHA1 Message Date
Tanner Linsley
6bb6aa435d v7.0.4 2020-04-02 14:34:15 -06:00
Tanner Linsley
25f1fba133 Update CHANGELOG.md 2020-04-02 11:15:01 -06:00
Tanner Linsley
9a8dc0feda Fix minification bug in flex renderer
Fixes #1992
2020-04-01 16:13:50 -06:00
Tanner Linsley
7c08467ddb Update CHANGELOG.md 2020-04-01 11:00:07 -06:00
Jason Clark
d2acfc4235
New documentation site built with Docz (#2013)
* size-snapshot created?

* Added docz for documentation site

* Modified .gitignore to get rid of .docz internal stuff

* Update all doc links to point to proper paths with docz

* Removed .docz folder from Git

Co-authored-by: Jason Clark <jason.clark@tcnbroadcasting.com>
2020-03-25 14:29:56 -06:00
Tanner Linsley
920420e330 Workflows, not travis 2020-03-10 13:20:53 -06:00
Tanner Linsley
07625844fd Update CHANGELOG.md 2020-02-15 20:02:17 -07:00
Tanner Linsley
083e81dc81 Normalize API method names and row modesl, add expandAll functionality including prop getter 2020-02-15 12:43:09 -07:00
Tanner Linsley
7dc9b85165 Polish merge conflicts and changelog updates 2020-02-14 12:12:24 -07:00
Tanner Linsley
b989a8fa76 Changed: Tests, aggregation, hooks, columnVisibility, docs 2020-02-14 11:23:05 -07:00
Tanner Linsley
d18f1ba4d8 Add global filtering support via useGlobalFilter 2019-12-18 13:22:58 -07:00
Tanner Linsley
30a40aa0a2 Change meta signature for hooks 2019-12-18 11:54:43 -07:00
Tanner Linsley
cb59098685 Fix column hiding, add useControlledStat hook 2019-12-18 10:39:35 -07:00
Tanner Linsley
d7b6e69c5f 7.0.0-rc.12 2019-12-17 22:10:56 -07:00
Tanner Linsley
b48cddb92b Add back useFlexLayout and full-width-resizable-table example 2019-12-17 20:41:28 -07:00
Tanner Linsley
eeee14830d Update Changelog 2019-12-17 19:32:07 -07:00
Tanner Linsley
9fa1396f26 Mucho updates 2019-12-13 00:22:30 -07:00
Tanner Linsley
ddfa0fa227 Death of the path, fix some hooks, fix selectedRows
- Fixed an issue where dependency hooks were not being reduced properly, thus the table would rerender unnecessarily
- Renamed `toggleRowSelectedAll` to `toggleAllRowsSelected`. Duh...
- Added an `indeterminate` boolean prop to the default props for row selection toggle prop getters
- Renamed `selectedRowPaths` to `selectedRowIds`, which also no longer contains paths, but row IDs
- Grouped or nested row selection actions and state are now derived, instead of tracked in state.
- Rows now have a new property called `id`, which existed before and was derived from the `getRowId` option
- Rows now also have an `isSomeSelected` prop when using the `useRowSelect` hook, which denotes that at least one subRow is selected (if applicable)
- Rows' `path` property has been deprecated in favor of `id`
- Expanded state is now tracked with row IDs instead of paths
- RowState is now tracked with row IDs instead of paths
- `toggleExpandedByPath` has been renamed to `toggleExpandedById`, and thus accepts a row ID now, instead of a row path
2019-12-10 23:04:34 -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
Tanner Linsley
b8701f260a Update CHANGELOG.md 2019-12-10 12:33:44 -07:00
Tanner Linsley
e1fd921f07 Add useFinalInstance plugin hook 2019-12-10 11:56:41 -07:00
Tanner Linsley
4a3311035d Added/updated hooks reorganization of hooks, new hook rules
- The exported (but undocumented) `applyHooks` function has been deprecated. Please use either `reduceHooks` or `loopHooks` utilities in your custom plugins now.
- The exported (but undocumented) `applyPropHooks` function has been deprecated. Please use the `makePropGetter` utility in your custom plugins now.
- Added the `reduceHooks` exported utility which is used to reduce a value through a collection of hooks. Each hook must return a value (mutation is discouraged)
- Added the `loopHooks` exported utility which is used to loop over a collection of hooks. Hooks are not allowed to return a value (mutation is encouraged)
- Prop-getter hook functions now support returning an array (in addition to the typical object of props). When an array is returned, each item in the array is smart-merged into a new props object (meaning it will intelligently compose and override styles and className)
- Added the `makePropGetter` exported utility which is used to create prop getters from a prop getter hook.
- Prop-getter function supplied to the table have 2 new overloaded options (in addition to the typical object of props):
  - `Function(props, instance, ...row/col/context) => Array<props> | props` - If a function is passed to a prop getter function, it will receive the previous props, the table instance, and potentially more context arguments. It is then be expected to return either an array of new props (to be smart-merged with styles and classes, the latest values taking priority over the previous values) or a props object (which will replace all previous props)
  - `Array<props>` - If an array is passed to a prop getter function, each prop object in the array will be smart-merged with styles and classes into the props from previous hooks (with the latest values taking priority over the previous values).
- Extracted default hooks into separate file.
- Added the `useOptions` plugin hook, which allows a plugin to reduce/modify the initial options being passed to the table
- 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)
2019-12-10 11:35:05 -07:00
Tanner Linsley
9de699bfd3 Add/rename a few hooks, fix useColumnVisibility header deps
- The `columnsBeforeHeaderGroups` and `columnsBeforeHeaderGroupsDeps` hooks have been renamed to `flatColumns` and `flatColumnsDeps` respectively, which better reflects what they are used for, rather than their order, which can remain implicit.
- Added `headerGroups` and `headerGroupDeps` hooks, which, similar to `flatColumns`, allow you to decorate (and trigger) the memoized header group generation.
- Added `columns` and `columnsDeps` hooks, which, similar to `flatColumns` and `headerGroups`, allow you to decorate (and trigger) the memoized column generation/decoration.
- The new hook order is as follows: `columns/columnsDeps` => `flatColumns/flatColumnsDeps` => `headerGroups/headerGroupsDeps`
- `useColumnVisibility` now uses the new `headerGroupsDeps` hook to trigger header group regeneration when visibility changes
2019-12-09 09:52:27 -07:00
Tanner Linsley
492ba8a4f9 Update Changelog 2019-12-08 19:35:55 -07:00
Tanner Linsley
c1e4fb8956 v7.0.0-rc.4 2019-12-08 19:26:49 -07:00
Tanner Linsley
67544d33ff v7.0.0-rc.3 2019-12-06 16:33:41 -07:00
Tanner Linsley
562a2feaef v7.0.0-rc.2 2019-12-06 16:30:08 -07:00
Tanner Linsley
a152704fde v7.0.0-rc.1 2019-12-05 23:36:14 -05:00
Tanner Linsley
a33a008608 Add Footer Support 2019-12-05 23:11:50 -05:00
Tanner Linsley
8ba553871f
Add useColumnVisibility as core hook (#1700)
* Update utils.js

* Update useTable.js

* Create useColumnVisibility.js

* Update useColumnVisibility.js

* Update useColumnVisibility.js

* Convert to core hook, use new reducerHanndler/actions

* Add useColumnVisibility internal hook
2019-12-05 15:45:25 -05:00
Tanner Linsley
b687cc01f0 7.0.0-beta.27 2019-12-04 22:46:53 -05:00
Tanner Linsley
0e243e28a8 v7.0.0-beta.26 2019-12-03 12:57:59 -07:00
Tanner Linsley
6b88340051 Merge branch 'master' of https://github.com/react-tools/react-table 2019-12-03 09:42:27 -07:00
Tanner Linsley
92603b6a70 v7.0.0-beta.24 2019-12-03 09:40:53 -07:00
Roman Kovtun
d7da8b631d Fix issue with missing columnId in updater on column spread (#1682) 2019-12-02 20:49:04 -07:00
Tanner Linsley
ef29b639bd Update CHANGELOG.md 2019-12-02 16:52:37 -07:00
Tanner Linsley
f9a6273184 Rename useMain and useBeforeDimensions hooks 2019-12-02 16:12:23 -07:00
Tanner Linsley
83f889dad5 v7.0.0-beta.22 2019-12-02 12:29:46 -07:00
Tanner Linsley
1682aef117 Removed deprecated defaultState export 2019-12-02 09:21:34 -07:00
Tanner Linsley
127a7fca87 v7.0.0-beta.20 2019-12-02 01:28:28 -07:00
Tanner Linsley
dac4744727 v7.0.0-beta.19 2019-12-01 00:23:42 -07:00
Tanner Linsley
301ab1b991 v7.0.0-beta.15 2019-11-25 12:48:07 -07:00
Tanner Linsley
3187061041 Use effect dependency user call 2019-11-20 12:09:24 -07:00
Tanner Linsley
b3a4a9db72 Update CHANGELOG.md 2019-11-20 10:25:40 -07:00
Tanner Linsley
df30b97956 Update CHANGELOG.md 2019-11-20 10:24:41 -07:00
Tanner Linsley
58028e45fc Rename disableGrouping, remove propTypes, update Readme 2019-11-20 10:23:52 -07:00
Tanner Linsley
ed3dd9e6b5 Add "default" sort/filter/groupBy options for non accessors, rename disableGrouping 2019-11-20 09:35:40 -07:00
tannerlinsley
7e6d719af4 docs(changelog): update changelog 2019-09-13 09:24:24 -06:00
tannerlinsley
6b70309f42 Add prettier format 2019-07-29 11:33:47 -06:00