Skip to content

Releases: jbetancur/react-data-table-component

v2.0.0

12 Jul 19:41
Compare
Choose a tag to compare

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

11 Jul 22:37
Compare
Choose a tag to compare

Maintenance

  • #140
    • updated react-testing-library
    • consolidate redundant tests
    • add test coverage and better test cases for key features

v1.7.3

08 Jul 14:43
Compare
Choose a tag to compare

Bug Fixes

  • #133 when using fixedHeader TableRows are squashed on certain versions of Chrome and Samsung based browsers. This was resolved by always setting a min-height on Table Rows. This new TableRow min-height also correlates to theme.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

v1.7.2

03 Jul 17:35
Compare
Choose a tag to compare

Features

  • #117 You can now use the sortFunction prop to override the default sort logic. sortFunction accepts a callback that gives you access to the same arguments used internally: (rows, field, direction) => {...your logic here that returns a sorted array}

Maintenance

  • Update Stories

v1.7.1

01 Jul 18:53
Compare
Choose a tag to compare

Bug Fixes

  • #126 Cell padding when using column.button in the last column (rightmost) was being incorrectly calculated.

v1.7.0

01 Jul 05:11
Compare
Choose a tag to compare

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 and expanded accept a react component.

v1.6.1

20 Jun 16:19
Compare
Choose a tag to compare

Bug Fixes

  • #111 and #116 Fix alignment of table columns when using expandableRows and/or when using expandableRows and selectableRows 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

20 Jun 15:14
Compare
Choose a tag to compare

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 🔥

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

16 Jun 13:37
Compare
Choose a tag to compare

Maintenance release

  • Bump internal dependencies
  • Bump to new version of storybook
  • Add Pagination Options story

v1.5.4

16 Jun 05:42
Compare
Choose a tag to compare

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 namedpaginationComponentOptions 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