Releases: jbetancur/react-data-table-component
Releases · jbetancur/react-data-table-component
v2.0.0
Release Notes
This is being released as a 2.0.0 as the sorting behavior has changed quite extensively (for the better) as well as some of the internals for dealing with React Context.
I don't really expect there to be any breaking changes with the exception of the rdt_TableCol
css hook (see notes below).
Fixes
- #139 Includes several fixes for sorting icon alignment, clickable sort area, and changes in sorting behavior. The expectation on the latter is that the sort direction should only change if the currently selected column is clicked again (asc, to desc etc....). Therefore, when selecting a new column, that column will be sorted based on the previous sort direction.
Maintenance
- #82 Moved away from render props to the new
useContext
hooks. Aside from making the code way more readable, this will help to clean up the DOM tree when using React Dev Tools and hopefully have some positive impact on performance - Bumped internal package deps
🔥 Possible Breaking Changes 🔥
- if you applied any customization using the css class
rdt_TableCol
, you may need to refactor.rdt_TableCol_Sortable
was added if you want to specifically target the sort css. Sorry about this but the TableCol component required some extensive refactor to make sorting work as it should.
v1.7.4
v1.7.3
Bug Fixes
- #133 when using
fixedHeader
TableRows are squashed on certain versions of Chrome and Samsung based browsers. This was resolved by always setting amin-height
on Table Rows. This new TableRowmin-height
also correlates totheme.rows.height
for when you need to override the row height.
Note you may need to clear your browser cache when using the storybook demo.
Known Issues
- #134
fixedHeader
is something that I will be looking to make more "dynamic" in a future release. For nowfixedHeader
relies on setting the TableBody to a fixed height and allowing overflow-y behavior. https://github.com/jbetancur/react-data-table-component/blob/1a8ecbbd2b15bf336d9422b0bf857c483b117eec/src/DataTable/TableBody.js#L6
This should probably be fine if you know your table is always going to be X height.
v1.7.2
v1.7.1
v1.7.0
Features
- #122 You may now disable individual expander rows using the
expandableDisabledField
. e.g.expandableDisabledField="disabled", then make sure every item in your data has a
disabled` cool prop. Thank you @wiland
🔥 Breaking Changes 🔥
- If you were overriding the expander icon via theming - this will no longer work. As such, you can now override the expander icon using
expandableIcon : { collapsed, expanded }
prop.collapsed
andexpanded
accept a react component.
v1.6.1
Bug Fixes
- #111 and #116 Fix alignment of table columns when using
expandableRows
and/or when usingexpandableRows
andselectableRows
together. Thanks to @hiukky for finding this - Fixed alignment with native selectable checkbox
- Fixed alignment of native sort icon
Note you may need to clear/force your browser cache when viewing the storybook
v1.6.0
Bug Fixes
- Fixes #113 where
onSort
was returning a stale sort state - The sort icon was reversed. asc should now point up and des should point down
- Updated peerDependancies to point to at least React 16.6.0
🔥 Breaking Changes 🔥
onSort
now returns a column object with your configured column fields. https://github.com/jbetancur/react-data-table-component#columns
e.g.
onSort({ ...column fields }, sortDirection, event)
You can also see an example here: https://jbetancur.github.io/react-data-table-component/?path=/story/basic--sortable
v1.5.5
v1.5.4
Features
- #99 #102 Thank you @Lknechtli. You can now set a
paginationDefaultPage
to default the pagination at the page of your choice. - #83 You may now pass in a new property named
paginationComponentOptions
which you can use to override certain props in default pagination component. This same property can be also be used when developing your own custom pagination component where you want to pass your own config values.
{
rowsPerPageText: 'Rows per page:',
rangeSeparatorText: 'of'
}
Bug Fixes
- #101 when changing the pagination rows per page the currentPage was not being recalculated correctly. This should now work correctly for both client and server-side pagination