All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
5.9.1 - 2024-12-19
meta dropdownFilter
in order to be controlled.
5.9.0 - 2024-12-17
columnPinning
feature. Allows the pinning of columns.
5.8.0 - 2024-12-02
- option
hideHeaderFilters
added to the column meta to hide the header filter (needs to be set to true for all columns) - option
headerFilterStyle
added to the column meta to be able to style the header filter - option
customFilterName
added to the column meta to be able to use different mappings than theaccessor
of the column description
pkg.pr.new
workflow in order to prevent caching issues
5.7.0 - 2024-10-04
- property
onRowClick
inReactDataTable
in order to define a custom function to execute the row is clicked - property
enableRowClick
inReactDataTable
in order to define if a row should be clickable or not
5.6.0 - 2024-10-02
- property
fullRowSelectable
in thereactTableOptions
to manually disable the selection onceenableRowSelection
is enabled and the row is anywhere clicked
5.5.0 - 2024-09-25
- added missing col span property for
grouped columns
feature
5.4.1 - 2024-07-05
- added missing optional
rowSelection
state in Fully controlled hook
5.4.0 - 2024-06-14
expanded
feature
5.3.0 - 2024-06-03
- possibility to override the default
noEntries
message in a singular case
5.2.0 - 2024-05-01
rowSelection
feature
- the
wiki
documentation is now linked in the readme
5.1.0 - 2024-04-05
- endless loop on
pagination
state when paginating client-side
- auto
pageIndex reset
when paginating server side
5.0.1 - 2024-03-27
sorting
andcolumnFilters
can be possibly undefined for notuseReactDataTable
hook
5.0.0 - 2024-03-27
- the
reset icon
will now reset the table to the initialState if provided, otherwise to the first value of the state - 💥 the
sorting
accepts now a strongly typed object instead of a list - 💥 the
columnFilters
can be used only defining afilter type
to datatable hooks
- 💥 utilities
getColumnFilterFromModel
andgetModelFromColumnFilter
are not exposed anymore
4.2.0 - 2024-03-22
- option
dragAndDropOptions
to enable drag-and-drop rows via@dnd-kit
package.
- option
cellClassName
added to the column meta to add class names to every cell of a column - option
headerClassName
added to the column meta to add class names to every header of a column - option
footerStyle
added to the column meta to add styles to every footer of a column - option
footerClassName
added to the column meta to add class names to every footer of a column
4.1.0 - 2024-03-13
- option
hidePageSizeChange
added to hide the possibility to change the page size
4.0.0 - 2024-03-06
- Skeletons for when the data is loading
-
💥 Fundamentally changed how this package works. The state is now managed by the consumer of this package. This means that the consumer has to provide the data and the functions to update the data. The package only provides the UI components to display the data. This change was necessary to make the package more flexible and to allow the consumer to use the package in a wider range of use cases. Behind the scenes, the package uses the
useTable
hook from the@tanstack/react-table
package. The consumer can use theuseTable
hook directly if he wants to. TheReactDataTable
component is just a wrapper around theuseTable
hook. TheReactDataTable
component is still the recommended way to use this package. -
💥 renamed
possiblePageItemCounts
topageSizes
. -
💥
columns
is now of typeColumnDef<TData, TValue>
from the@tanstack/react-table
package. Please refer to the documentation of the@tanstack/react-table
package for more information: https://tanstack.com/table/v8/docs/api/core/table#columns (there are additional custom fields in the column.meta object defined by us:src/react-table.d.ts
)
- 💥 removed
rowHighlight
. UserowStyle
instead. - 💥 removed
enablePredefinedSort
prop. UseinitialState.sorting
instead. Orstate.sorting
if you want to manage the state yourself. - 💥 removed
predefinedFilter
prop. UseinitialState
. - 💥 removed
asc
prop. UseinitialState.sorting
instead. Orstate.sorting
if you want to manage the state yourself. - 💥 removed
predefinedItemsPerPage
prop. UseinitialState.pagination.pageSize
instead. Orstate.pagination.pageSize
if you want to manage the state yourself. - 💥 removed
orderBy
prop. UseinitialState.sorting
instead. Orstate.sorting
if you want to manage the state yourself. - 💥 removed
client
prop. Usedata
prop instead and manage the state of the data yourself. - 💥 removed
query
prop. Usedata
prop instead and manage the state of the data yourself. - 💥 removed
handlers
prop. Since the state is now managed by the user, the user is responsible for updating the data. - 💥 removed
actions
props. You can easily define whatever actions you would like to have in thecolumns
prop. This is an example of how you could configure the actions column:
import { createColumnHelper } from "@tanstack/react-table";
const columnHelper = createColumnHelper<YourData>();
columnHelper.display({
id: "edit",
header: () => <span>Aktionen</span>,
cell: (props) => (
<>
<Link href={{ pathname: "/addresses/[addressId]", query: { addressId: props.row.getValue("addressId") } }}>
<FontAwesomeIcon icon={faEye} style={{ marginRight: "5px" }} />
</Link>
<FontAwesomeIcon
icon={faTrash}
style={{ marginRight: "5px" }}
onClick={async () => {
// do something
}}
/>
</>
),
}),
3.8.0 - 2023-11-20
- Changed
DeleteAction
to exposecancelButtonText
anddeleteButtonText
props for translations
3.7.0 - 2023-11-16
- Added property
withoutHeaders
to draw the table without any header row (title + filters)
3.6.0 - 2023-10-26
- Updated react-pattern-ui from 2.4.0 to 2.9.0
3.5.0 - 2023-10-05
- Added function
getFilterState
to get current status of filters - Added function
updateFilters
to update filters and refresh dataTable
3.4.0 - 2023-10-03
- Added nullable
disabled
prop toEnumValue
type
3.3.0 - 2023-08-07
- Updated react-pattern-ui to 2.4.0
3.2.0 - 2023-08-04
- Added support to "react" version "^18.0.0" in peerDependencies
- Added support to "react-dom" version "^18.0.0" in peerDependencies
- Added support to "reactstrap" version "^9.0.0" in peerDependencies
- Added support to "@fortawesome/react-fontawesome" version "^0.2.0" in peerDependencies
- Fixed export for CommonJS
3.1.0 - 2023-08-03
- Updated react-pattern-ui to 2.3.0
3.0.0 - 2023-07-26
- 💥
view
default Action does not nest an<a>
tag anymore.
2.7.3 - 2023-06-29
orderBy
property ofQueryFunction
type can be string or undefined.
2.7.2 - 2023-06-29
- Excluded test code from the package and made sure the paths are pointing to the correct
.d.ts
files
2.7.1 - 2023-06-16
- update types file location in package.json
2.7.0 - 2023-06-16
- update
@neolution-ch/react-pattern-ui
to the latest version (2.2.1)
2.6.1 - 2023-06-13
- Moved
@neolution-ch/react-pattern-ui
to the dependencies, so it gets correctly detected by rollup as an external dependency
2.6.0 - 2023-06-12
- Changed from
microbundle
torollup
for building the package - Updated all the dependencies to the latest possible version
- Display predefined filter in filter row
2.5.0 - 2023-05-25
- the prop
enablePredefinedSort
to all tables. Set boolean condition for which the orderBy option should be ignored. Set asfalse
by default if not specified.
2.4.0 - 2023-05-17
- the prop
rowHighlight
to all tables. CheckRowHighlightInterface
for prop definition. Set condition for which a row should be highlighted. Possibility to set custom style for highlights
2.3.2 - 2023-03-08
- the style 'white-space:no-wrap' to default 'ActionCell' to have icons on the same line
2.3.1 - 2023-03-07
- depandabot: Bump ejs from 3.1.6 to 3.1.8
2.3.0 - 2023-03-06
- the prop
icon
to theDataTablePredefinedActionLink
interface to specify the view action column icon. Possible values are allIconProp
. The default value is the eye iconfaEye
2.2.0 - 2023-02-22
- the prop
actionsPosition
to theDataTable
component to specify the position of the actions column. Possible values areleft
andright
. The default value isleft
.
2.1.2 - 2022-06-20
- Added asc prop to specify the arrow icon sorting direction
- Added orderBy prop to specify the sorting key value
2.1.1 - 2022-05-04
- Moved storybook to github pages
2.1.0 - 2022-05-02
- Dynamic table handler to reload the data from an external source.
- Added new story to reload data with sample code.
- Implemented className and style properties to the table and the actions.
- Added reload tests.
- Changed max-lines allowed in DataTableInterfaces.ts.
- Changed max-lines allowed in DataTableRouted.tsx.
2.0.3 - 2022-04-19
- Story book
2.0.2 - 2022-04-14
- Upgraded @neolution-ch/react-pattern-ui dependency to 2.0.2
2.0.1 - 2022-04-14
- Fix added for missing react import aftger microbundling
2.0.0 - 2022-04-12
- created package 🎉