- Fixed an issue where
useRowState
would crash due to invalid initial state of previous cell state oncolumnId
lookup
- Changed
selectedRowPaths
to use aSet()
instead of an array for performance. - Removed types and related files from the repo. The community will now maintain types externally on Definitely Typed
- The internal
useMain
hook has been renamed touseInstance
- The internal
useBeforeDimensions
hook has been renamed touseInstanceBeforeDimensions
- Fixed an issue where
useResizeColumns
wasn't working properly
- Fixed an issue where
useRowState
would crash due to invalid initial state attempting to spread into the new state
- Removed deprecated
defaultState
export
- Internals have been reworked to use
useReducer
instead ofuseState
for stability and architecture - The
state
option has been removed in favor of using a custom reducer - The
reducer
option has been changed to a new function signature:function (newState, action, oldState) => newState
- The
setState
table instance method is no longer supported - The
dispatch
table instanced method was added - The
ReactTable.actions
export is now a plain object of action types mapped to identically named action strings - The
ReactTable.reducerHandlers
export was added, which is a plain object of plugin hook names mapped to their respective reducer functions
- Added an
isAggregated
boolean parameter to theaggregate
function signature
- Removed service workers from examples
- Fixed a memory leak when
instance
was referenced in function closures - Fixed an issue where the table would infinitely rerender due to incorrect effect dependencies
- Fixed an issue where row grouping and row selection would not work properly together.
- Fixed an issue where
defaultGetResetPageDeps
was usingdata
instead ofrows
- Removed
disablePageResetOnDataChange
option. use thegetResetPageDeps
option now.
- Added
getResetPageDeps
optiongetResetFilterDeps
optiongetResetSortByDeps
optiongetResetGroupByDeps
optiongetResetExpandedDeps
option
- Added options
defaultCanSort
defaultCanFilter
defaultCanGroupBy
column.defaultCanSort
column.defaultCanFilter
column.defaultCanGroupBy
- Renamed
disableGrouping
todisableGroupBy
disableSorting
todisableSortBy
disableGroupBy
todisableGroupBy
column.disableGrouping
tocolumn.disableGroupBy
column.disableSorting
tocolumn.disableSortBy
column.disableGroupBy
tocolumn.disableGroupBy
- Removed propType definitions. Since types are now being maintained, it makes little sense to also maintain these. Cooincidentally, this also saves some bundle size in some scenarios where they may not be removed properly by a developer's bundler.
- Massive changes to the entire project and library. Please consult the README and documentation for more information regarding these changes.
- Since
resolveData
is now capable of materializing data on it's own, thedata
prop is no longer required as a prop-type.
- Only run
resolveData
prop whendata
prop has changed, not any others.
- Allow the
resolveData
prop to alter or materialize new data when thedata
prop changes.
- Updated eslint and code formatting
- Now passes
column
togetResizerProps
(#667) - NOTE:
getResizerProps
is now only called if the column is resizable - Fixes the
className
ordering in defaultProps for ThComponent (#673) - NOTE: user supplied classNames now come at the end so they can extend the defaults
- Fix Prop types for columns
- Fix the rest of the proptypes
getPropTypes
proptype check
eslint-config
moved to dev deps
- Expose page/pageSize to rows/cells
- Supply sort direction to custom sort methods
- README updates
- Linter cleanup
- Added PropTypes node module
- Deps, linting and style upgrades
- moved repo to react-tools
- Doc examples moved to codesandbox.io
- README updates
- CSS refacting for rt-tfoot to match rt-thead
- CSS more specific for input and select
onClick
proxying and eslint
- Provide onClick handleOriginal function - #406
- README updates
makePathArray
in utils - #326- Various fixes: #294, #376, #398, #415,
defaultExpanded
now works correctly - #372column.getProps().rest
props are now applied correctlymakeTemplateComponent
now supportsdisplayName
- #289
column.filterAll
- defaults tofalse
, but when set totrue
will provide the entire array of rows tofilterMethod
as opposed to one row at a time. This allows for more fine-grained filtering using any method you can dream up. See the Custom Filtering example for more info.
PadRowComponent
- the content rendered inside of a padding row. Defaults to a react component that renders
defaultSortDesc
- allows you to set the default sorting direction for all columns to descending.column.defaultSortDesc
- allows you to set the default sorting direction for a specific column. Falls back to the globaldefaultSortDesc
when not set at all.
- New Renderers:
Aggregated
- Custom renderer for aggregated cellsPivot
- Custom renderer for Pivoted Cells (utilizesExpander
andPivotValue
)PivotValue
- Custom renderer for Pivot cell values (deprecates the undocumentedpivotRender
option)Expander
- Custom renderer for Pivot cell Expander
- Added custom sorting methods per table via
defaultSortMethod
and per column viacolumn.sortMethod
- Pivot columns are now visibly separate and sorted/filtered independently.
- Added
column.resizable
to override global tableresizable
option for specific columns. - Added
column.sortable
to override global tablesortable
option for specific columns. - Added
column.filterable
to override global tablefilterable
option for specific columns. - Added
defaultExpanded
table option. - All callbacks can now be utilized without needing to hoist and manage the piece of state they export. That is what their prop counterparts are for, so now the corresponding prop is used instead of the callback to detect a "fully controlled" state.
- Prevent transitions while column resizing for a smoother resize effect.
- Disable text selection while resizing columns.
- New Renderers:
Cell
- deprecates and replacesrender
Header
- deprecates and replacesheader
Footer
- deprecates and replacesfooter
Filter
- deprecates and replacesfilterRender
- Callbacks now provide the destination state as the primary parameter(s). This makes hoisting and controlling the state in redux or component state much easier. eg.
onSorting
no longer requires you to build your own toggle logiconResize
no longer requires you to build your own resize logic
- Renamed
onChange
callback ->onFetchData
which will always fire when a new data model needs to be fetched (or if not usingmanual
, when new data is materialized internally). - Renamed
filtering
->filtered
- Renamed
sorting
->sorted
- Renamed
expandedRows
->expanded
- Renamed
resizing
->resized
- Renamed
defaultResizing
->defaultResized
- Renamed
defaultFiltering
->defaultFiltered
- Renamed
defaultSorting
->defaultSorted
- Renamed
onSortingChange
->onSortedChange
- Renamed
onFilteringChange
->onFilteredChange
- Renamed
onResize
->onResizedChange
- Renamed
onExpandRow
->onExpandedChange
- Renamed
showFilters
->filterable
- Renamed
hideFilter
->filterable
(Column option. Note the true/false value is now flipped.) cellInfo.row
androwInfo.row
now reference the materialize data for the table. To reference the original row, usecellInfo.original
androwInfo.original
- Removed
pivotRender
column option. You can now control how the value is displayed by overriding thePivotValueComponent
or the individual column'sPivotValue
renderer. See Pivoting Options Story for a reference on how to customize pivot column rendering.