This release upgrades to a new major version of React Table (#35), which introduces many new features, improvements, and bug fixes. Backward compatibility was kept where possible, but note that there are several breaking changes.
- Column group headers can now be resized.
- Column group headers and filters are now sticky. Previously, only column headers were sticky (#107).
- Expanded rows now stay expanded on sorting, filtering, and pagination changes. Previously, expanded rows were always collapsed on sorting and pagination changes, and incorrectly persisted on filtering changes (#39).
- Aggregated rows can now be selected when multiple selection is enabled.
- JavaScript render functions and style functions receive several new properties:
rowInfo.expanded
andcellInfo.expanded
indicating whether the row is expandedcellInfo.selected
property indicating whether the cell's row is selectedstate.page
,state.pageSize
, andstate.pages
for the current page index, page size, and number of pages in the table
- JavaScript render functions for cells, headers, footers, and row details
can now access the table state using a new
state
argument (#88). - Custom cell click actions can now access the table state using a new
state
argument.
- When expanding grouped rows, sub rows are now paginated and included in the
row count. Use
reactable(paginateSubRows = FALSE)
to exclude sub rows from pagination like before. - The row selection column is now always placed as the first column in the
table, even before the
groupBy
and row details columns (#71). - Increased the default width of the row selection column to match the row details column (45px).
- When both
columnGroups
andgroupBy
arguments are provided,groupBy
columns are no longer added to a column group automatically (#87). - The
defaultGroupHeader
argument inreactableLang()
is now deprecated and no longer used. Use thecolumnGroups
argument inreactable()
to customize the column group header forgroupBy
columns. - The
state.expanded
property has been removed from JavaScript render functions and style functions. To check whether a row is expanded, userowInfo.expanded
instead. - The
rowInfo.page
andcellInfo.page
properties have been removed from JavaScript render functions and style functions. To get the current page index of the table, usestate.page
instead.
- Setting
show = FALSE
as a default value indefaultColDef()
now works (@csgillespie, #105). - Using a single value for
pageSizeOptions
inreactable()
now works. - Column resizing is now limited by the min and max width of the column.
- Column group headers and filter cells in fixed height tables now display properly in Safari, Chrome, and the RStudio Viewer (#76).
- In
reactable()
,defaultExpanded = TRUE
now expands all rows in the table, not just rows on the first page. - In
reactable()
,defaultExpanded = TRUE
now works when column groups are present. - Aggregated cell values are now recalculated when filtering or searching the table.
- Aggregate functions now always take the unaggregated values in the column.
Previously, if there were multiple
groupBy
columns, aggregate functions could take aggregated values which could produce inaccurate calculations (e.g., when calculating the mean of values). - Searching now properly ignores the row details and selection columns.
- Selected rows now reset when the table data changes in Shiny (#110).
- When selecting rows, errors from other Crosstalk widgets no longer cause the table to disappear.
- HTML widgets and HTML dependencies in nested tables now render correctly (#125).
- Row expand buttons now set the
aria-expanded
attribute to indicate expanded or collapsed state. The default label for row expand buttons is now "Toggle details" instead of "Expand details" or "Collapse details". reactableLang()
gains thegroupExpandLabel
andgroupCollapseLabel
arguments to customize the accessible labels for row group expand buttons.- Cells in the row names column are now marked up as row headers for assistive technologies.
- Fixed a character encoding issue in the documentation.
- Headers in fixed height tables now display properly in Safari, Chrome, and the RStudio Viewer (#76).
updateReactable()
gains adata
argument to update the data of a reactable instance in Shiny (#49).
- Row selection columns now display correctly in tables with column groups (#52).
defaultSelected
now works correctly with Crosstalk linked selection.- Crosstalk selection and filtering now works with nested and dynamically rendered tables #57).
- Tables now display correctly for Crosstalk
SharedData
objects with zero or one rows. - Shiny UI elements in expanded row details are now properly removed when collapsed on page changes.
colFormat()
now always formats numbers as a localized string whenlocales
is specified.- Table rows no longer stretch to fill the height of the container
(#69). To make rows stretch
again, use a theme like
reactableTheme(tableBodyStyle = list(flex = "auto"))
. - Multi-sorting no longer selects text in column headers.
reactable()
now supports linked selection and filtering with Crosstalk-compatible HTML widgets (#46).reactable()
gains atheme
argument to customize the default styling of a table.reactable()
gains alanguage
argument to customize the language strings in a table (#24).reactable()
gains adefaultSelected
argument to set default selected rows.reactable()
gains adefaultExpanded
argument to set default expanded rows (#23).- New
updateReactable()
function to update the selected rows, expanded rows, or current page of a reactable instance in Shiny (#20). - New
getReactableState()
function to get the state of a reactable instance in Shiny (#20). colDef()
gains a"median"
aggregate function to calculate the median of numbers (#30).- The row selection column can now be customized using
".selection"
as the column name (#19). - In
reactable()
, therowClass
,rowStyle
, anddetails
JavaScript functions now receive arowInfo.selected
property indicating whether the row is selected (#20).
- The
selectionId
argument inreactable()
will be deprecated in a future release. UsegetReactableState()
to get the selected rows of a table in Shiny instead.
- General accessibility improvements, particularly for screen reader users.
- Table searching now works correctly when row selection is enabled.
colFormat(date = TRUE)
now formatsYYYY-MM-DD
dates correctly (#38).colFormat(percent = TRUE)
now works correctly when viewing tables in IE11.- Cell click actions now work for all cells in aggregated rows.
- Aggregated cells in columns with row details no longer throw an error when clicked.
- In
colDef()
, theclass
andstyle
R functions now handle list-columns correctly. - Column headers now truncate long text properly.
- Footers now display properly in fixed height tables for Safari and Chrome (#41).
- Dark themes no longer affect text color in RStudio R Notebooks (#21).
- Checkboxes and radio buttons now align with multi-line text in selectable tables.
- Text selection now works in column headers.
- Row striping and highlighting styles no longer affect nested tables.
- Updated tests for compatibility with R 4.0.0.
- Initial release.