Commit Graph

120 Commits

Author SHA1 Message Date
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
b48cddb92b Add back useFlexLayout and full-width-resizable-table example 2019-12-17 20:41:28 -07:00
Tanner Linsley
562a2feaef v7.0.0-rc.2 2019-12-06 16:30:08 -07: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
127a7fca87 v7.0.0-beta.20 2019-12-02 01:28:28 -07:00
tannerlinsley
bbfc6428b7 refactor(usetable/usetablestate): integrate useTableState into useTable
useTableState was an early and hasty abstraction that hasn't proved useful in many ways. Anything
you could do with useTableState, you could easily do using the same options (assuming they exist) in
the useTable hook. For this reason, state is now a first class citizen of the useTable hook, along
with more sane properties and option locations for anything pertaining to state.
2019-10-05 20:48:28 -06:00
tannerlinsley
de7f5c9385 feat(useresizecolumns): added useResizeColumns 2019-10-03 08:25:36 -06:00
tannerlinsley
247687ee08 feat: ingested width logic, useAbsoluteLayout useBlockLayout
Width options (`width`, `minWidth`, `maxWidth`) options are now a part of the core column object.
useBlockLayout and useAbsoluteLayout hooks now use this new internalized information to implement
their layouts. Those examples have been updated. A virtualized-rows example has also been added to
show off how the useBlockLayout hook can be used to virtualize rows with react-window.
2019-10-01 14:03:11 -06:00
gargroh
b6fdb99f06 useAbsoluteLayout: Enable react-table to build with divs (#1522)
* useAbsoluteLayout: To build tables with divs

* Adding `placeholderOf` attribute to column

* Adding `useAbsoluteLayout` in index.js

* Adding `useAbsoluteLayout` example

* Adding `useAbsoluteLayout` in api docs

* Adding test for `useAbsoluteLayout` hook
2019-09-30 07:40:35 -06:00
tannerlinsley
072967b771 fix: fix defaultColumn.sortType, fix useGroupBy plugin order warning 2019-09-05 11:07:25 -06:00
tannerlinsley
b0d6169848 feat: added useColumnOrder + examples 2019-08-27 09:59:52 -06:00
tannerlinsley
785b524d3c fix: removed useFlexLayout, fixed dot notation for accessors 2019-08-20 12:55:50 -06:00
tannerlinsley
98466e6414 docs(docs): improve docs 2019-08-15 15:32:03 -06:00
tannerlinsley
8508a6567d feat(multiple): useRowState, fix useRowSelect/useSortBy/usePagination 2019-08-06 19:57:48 -06:00
tannerlinsley
037c32345f feat(use-row-select): added useRowSelect plugin hook + related 2019-08-03 14:20:08 -06:00
tannerlinsley
512790bc1c fix(multiple): sub-components example, minor refactors
Fixes #1423
2019-08-02 07:42:42 -06:00
tannerlinsley
dc73347003 Relocate columns and row logic, fix columns and useGroupBy to be more pure
Since useColumns was relying on groupBy logic, this was code smell. I wanted useGroupBy to be able to add that logic all by itself and not have to have dependencies in the core of the table.

To fix that, I've moved the core column and row logic to the useTable hook and added a new hook 'columnsBeforeHeaderGroups' to allow useGroupBy to do what i needs in a more pure way.
2019-07-29 11:00:07 -06:00
tannerlinsley
c7d6562d04 Change actions and addActions to be simpler to use 2019-07-23 12:30:15 -06:00
Maksim Horbachevsky
2ecf40518e Export utils to create custom hooks (#1403) 2019-07-23 12:03:17 -06:00
tannerlinsley
5043af5071 Move useColumns and useRows into useTable (but allow overrides) 2019-07-23 10:22:46 -06:00
tannerlinsley
455e0730bf Bare bones basic example 2019-07-18 14:56:03 -06:00
Gary Menzel
98bee0a4a7 Feature/useSimpleLayout (#1322)
* Install useSimpleLayout and adjust useTable and useRows as required.

* useSimpleLayout integration

* Minor final fix - replace .filter with .forEach

* Used a spread on the path.
2019-04-28 09:53:34 -06:00
Tanner Linsley
a0495f6858 Rename hook files 2019-02-11 09:33:34 -07:00
Tanner Linsley
2a6dfb6ebd Init v7 src 2019-01-31 12:54:56 -07:00
Tanner Linsley
00efc98779 Fix linting, update Readme 2019-01-31 12:13:34 -07:00
John Maguire
3fff682578 apply @twheys PR #1077 as patch and update Array.concat to [].concat (#1241) 2019-01-31 10:15:09 -07:00
Josh McCullough
221164484f cleanup all but one linting issue (#1232) 2019-01-31 10:08:31 -07:00
Andrej Gajdos
c7d2c36454 adding position prop into pagination component (#1205)
- adding isTop prop into pagination component, which allows
differentiate if pagination is on top or bottom of the table
2019-01-31 10:08:06 -07:00
Leonardo Merza
836f256031 added closeExpanded function to subComponent callback (#1121) 2018-10-04 14:48:18 -06:00
Kyle Halleman
41784cd52d allow rest props from getTfootProps for TfootComponent (#1035) 2018-10-04 14:39:48 -06:00
Don Pflaster
ac8b497671 Tree uses accessor or ID and always shows pivot cells (#1011)
* Also check ID field when finding pivot col in treeTableHOC

* Pass the ID if you've got one on treeTableHOC

* An expandable cell should never be hidden
2018-10-04 14:36:46 -06:00
Efim Pasianidi
b12238d535 Add defaultPage prop (#941)
* add defaultPage prop

* fix defaultPage in manual mode
2018-05-24 16:36:19 -06:00
Richard A
60766cf261 Add prefix to key of pad rows (#828)
Add prefix to key of pad rows so it doesn't conflict with keys of page rows.
Duplicate keys are causing rendering issues with preact.
2018-05-24 16:23:53 -06:00
Tanner Linsley
a1f5b462d5 Revert mistaken removal of rt-resizable-header-content div 2018-04-17 15:14:05 -06:00
Tanner Linsley
9fe806d8a7 Update Eslint and Code Formatting 2018-04-17 12:22:34 -06:00
Simon Angell
ddf877bcac Add column to getResizerProps (#667) 2017-12-12 15:09:23 -08:00
Gary Menzel
f74ba3cc16
Examples Refactor + multiSort flag (#619)
* chore: Update the devDependencies for the linter

* A few HOC examples for react-table.
Not really integrated with the whole codesandbox.io approach.

* Missing dependency - shortid

* Refactor HOCs to /src/hoc
Still have to write the HOCReadme.md (still just a placeholder for now)

* Refactor complete
May need to remove some redundant code

* Text change for the HOC samples

* Introduced a 'multiSort' flag
Defaults to 'true'
A 'false' value will turn multi-sort off.

* refactor: Fix defaultProps.js linter errors

* refactor: Fix lifecycle.js linter errors

* refactor: Fix pagination.js linter errors

* refactor: Fix propTypes.js linter errors

* refactor: Fix utils.js linter errors

* refactor: Fix methods.js linter errors

* refactor: Fix index.js linter errors

* Fix for linter changes + CHANGELOG update
2017-11-23 15:30:07 +11:00
Will Olson
fa425a162a Linter cleanup (#548)
* chore: Add local dependencies needed to run the test suite

* style: Fix eslint errors regarding multilines JSX
2017-10-27 12:10:41 -06:00
Will Olson
e42b7bbd7d Add the PropTypes node module (#550)
* feat: Add prop types to the library

* fix: Update typos in src/propTypes.js
2017-10-27 12:08:33 -06:00
Dylan Markow
e91bb91ea1 Expose page/pageSize to rows/cells (#581) 2017-10-27 12:06:46 -06:00
Jeffrey Priebe
e3528fef38 Use isResizable value in ThComponent classname (#429)
Also in child div
2017-08-09 12:55:43 -06:00
Tanner Linsley
8efeef3b8b Fix onClick proxying and eslint 2017-08-02 13:39:34 -06:00
Tanner Linsley
9846bf1905 Provide onClick handleOriginal function
Fixes #406
2017-08-02 13:15:16 -06:00
Tanner Linsley
7f5779a833 Some simple event propagation fixes (but not the 100% fix) 2017-08-02 12:10:46 -06:00
ldstein
098b1fec51 Max width NaN fix (#415)
* Added button to reset table state in Controlled Component story

* Fix maxWidth style when value is NaN

* code formatting
2017-08-01 21:27:40 -06:00
Tanner Linsley
8dc4caff45 Fix: column.getProps().rest props are now applied correctly 2017-07-05 16:58:14 -06:00
Tanner Linsley
3b2432f535 Formatting with prettier + eslint 2017-07-03 09:48:24 -06:00
Tanner Linsley
2e3743b75f Feature: PadRowComponent prop 2017-06-19 11:34:21 -06:00
Tanner Linsley
d9248cef2b Added defaultSortDesc prop and formatted with prettier + project's eslint 2017-06-09 21:02:28 -06:00