* added assertion to check for show property inside column
* reverted previous change
* added a filter to weed out non-visible columns when calculating the size for grouped Headers
* added another case to the previous filter to factor in blank grouped Headers
* Fix pagination resetting to page zero with manualPagination
To be honest I'm not sure what this useLayoutEffect is there to do.
It has no visible effect if you don't use manualPagination, and if you
do it, simply jumps you back to the first page, defeating the point of
you having control of the pagination.
* Conditionally reset page on data change
Rather disable the whole page reset when filters, groupBy or sortBy
change, just because I wanted to disable the page reset on data change,
make that bit be conditional.
With that in mind, usePagination now accepts a
disablePageResetOnDataChange parameter.
V7 adds the option to remove a sort option, so it goes from asc -> desc
-> unset, then repeats. V6 just went from asc -> desc then repeated.
Personally I much preferred this, I think that there's a case to be made
that this is the more expected behavior.
I'm not sure if this is really the best way to fix this since it adds
yet another api option and I completely understand that that is less
than desirable, but I also would rather add an option than have to
duplicate the whole useSortBy hook.
This change allows you to technically use React Table without a layout hook. Under that assumption, you would need to come up with your own styling mechanisms for display.
The useSimpleLayout merely adds a single `width` style to the prop getters for column headers and cells.
The useFlexLayout is much more robust. Personally though, I have moved away from both, and am just using raw `display: table-row/table-cell` styles to let my tables display naturally.
* Install useSimpleLayout and adjust useTable and useRows as required.
* useSimpleLayout integration
* Minor final fix - replace .filter with .forEach
* Used a spread on the path.