Commit Graph

38 Commits

Author SHA1 Message Date
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
90922f8637 Upgrade filter types to support configurable autoRemoval 2019-07-26 10:19:38 -06:00
tannerlinsley
4f13f32023 Update rendering API and column/header model 2019-07-25 10:24:30 -06:00
tannerlinsley
fbc8032d29 Fix disableMultiSort, change from sortByFn to sortTypes 2019-07-18 12:08:55 -06:00
tannerlinsley
daff1f9ca3 Documentation Checkpoint 2019-07-17 12:39:35 -06:00
Larry Botha
e2bb09d8b2 Feature/add prettier config, ref #1383 (#1384)
* add prettier config

* write files with prettier

* install and configure lint-staged and husky - ref 1.2 in #1383

* feat(style): add prettier configs, ref 1.1 & 1.2 in #1383
2019-07-01 21:03:57 -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
John Maguire
3fff682578 apply @twheys PR #1077 as patch and update Array.concat to [].concat (#1241) 2019-01-31 10:15:09 -07:00
Jeremy Liberman
7876a3876c Resolve "cannot call class as a function" error (#1050)
When rendering a class component using the `class extends React.Component {}` syntax, you would get an error `TypeError: Cannot call a class as a function` because the check to determine whether a component was a class component was insufficient. It seems pointless to even have a check, however, because the JSX syntax can render both class and functional components.
2018-10-04 14:42:16 -06:00
Tanner Linsley
9fe806d8a7 Update Eslint and Code Formatting 2018-04-17 12:22:34 -06:00
Gary Menzel
0443644ccd Fixes #643
Still requires some basic sanity test to ensure ReactTable does
not have any fundamental coding errors.
Modified some of the /docs code to help with manual testing.
2017-11-27 09:50:36 +11:00
Will Olson
b310a2ebc4 refactor: Fix utils.js linter errors 2017-11-22 09:33:10 -08: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
Tanner Linsley
9846bf1905 Provide onClick handleOriginal function
Fixes #406
2017-08-02 13:15:16 -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
750cfe3ac4 Fix Linting 2017-07-31 10:37:12 -06:00
qmorel
688afd2947 [refs #321]: correct makePathArray function in utils (#326) 2017-07-19 14:43:32 -06:00
Tanner Linsley
62f19aecf0 Fix: makeTemplateComponent now supports displayName
Fixes #289
2017-07-05 17:08:08 -06:00
Tanner Linsley
d9248cef2b Added defaultSortDesc prop and formatted with prettier + project's eslint 2017-06-09 21:02:28 -06:00
Tanner Linsley
49c5a3d5e1 Revert "Init"
This reverts commit f27ec1fb34.
2017-05-11 19:03:31 -06:00
Tanner Linsley
f27ec1fb34 Init 2017-05-11 18:19:17 -06:00
Tanner Linsley
2ba0bf73ad 6.0.0
* Use separate columns for Pivots and Expanders, more render options

* Better expanding and aggregation control

* Updated Renderer Keys and Stories (+ story cleanup)

* Fixed Typo

* Resizing Fixes, custom sorting, new api names

* +Key constants, prop/callback changes, controllable filters and resizing, subRow + pivoting expansion

* Remove console.log

* Trying generalize expanders to work on any column

* Fix up stories.

* Better custom sorting

* Finish fixing up stories with better source

* Fix SubComponent Story

* Updated Changelog

* 6.0.0

* Use Correct PivotingOptions source

* Handle edge cases in expandable hover states and event handlers

* Add defaultExpanded prop

* Rename sorting->sorted, onSortingChange->onSortedChange, defaultSorting->defaultSorted

* filtering->filtered, onFilteringChange->onFilteredChange, defaultFiltering->defaultFiltered

* Rename expandedRows->expanded, onExpandRow->onExpanded

* Rename resizing->resized, defaultResizing->defaultResized, onResize->onResizedChange

* Rename onExpanded->onExpandedChange

* Cleanup Readme

* Standardize global and column level resizable and sortable properties

* Rename showFilters->filterable, hideFilter->filterable

* Cleanup Changelog and lint errors

* Remove unused prop

* Remove unused prop from readme.
2017-05-11 13:10:17 -06:00
Aaron Schwartz
52f2c9fdac Fix descending sort being non-deterministic
Descending sort would sort differently for the same data on rerender for items that evaluated to the same value.
2017-04-06 15:25:56 -07:00
Ryan Palermo
10dc68acc1 use Object.getPrototypeOf instead of .prototype (#117) 2017-03-08 11:43:29 -07:00
Tanner Linsley
d7a58450b7 Added support for Column Footers 2017-02-16 10:41:52 -07:00
Tanner Linsley
48ea0df09d Normalize all JSX callbacks to support functions 2017-02-15 09:54:57 -07:00
Tanner Linsley
e702fc80ca defaultSorting changes and doc updates 2017-02-10 16:46:14 -07:00
Jan Z
1e4f838326 'collapseOnChange' and 'freezeWhenExpanded' (#61)
* rough draft of "closeSubComponentOnDataChange" and "preventAutoSortWhenComponentIsOpen"

* changed flag name from ...component to ...subcomponent

* fixed problem with sorting not immediately being applied. passes tests now

* changed var names

* Cleanup and simplification

* Fix deps

* Better freezing strategy

* subcomponent reverse
2017-02-06 15:09:35 -07:00
Tanner Linsley
83200d4e4c Rewrite of dynamic props and stable sorting algorithm 2017-02-02 18:13:40 -07:00
Tanner Linsley
66f1b04ba6 Fix utils.groupBy where watch key would cause error in Firefox 2017-01-19 19:37:32 -07:00
Tanner Linsley
8fa7975ca5 Pivoting & Aggregation 2017-01-16 13:15:56 -07:00
Tanner Linsley
09f425aeb3 Redux package size to 5kb 2017-01-13 09:42:07 -07:00
Tanner Linsley
3c5ba2843d Bug fixes and readme updates 2017-01-11 19:58:52 -07:00
Tanner Linsley
e5689bc9d4 New core styling, sub-components, React-Storybook instead of jumpsuit example 2017-01-11 16:23:49 -07:00
Tanner Linsley
516b88468e Major changes for server-side data 2016-10-31 01:49:43 -06:00
Tanner Linsley
f13c9c3546 example and readme 2016-10-20 17:43:27 -06:00
Tanner Linsley
76542c448e Initial commit 2016-10-20 15:08:27 -06:00