Breaking Changes
- React 19 minimum: peer dependency narrowed from
^16.8.0 || ^17 || ^18 || ^19to^19.0.0. The library now uses React 19'suse()hook internally. change-caseis now a production dependency: previously bundled into the output, now externalized. It will be auto-installed as a transitive dependency.- Renamed type aliases: TransformFN → TransformFn, RowClickFN → RowClickFn, KeyResolverFN → KeyResolverFn. If imported via deep paths, update accordingly.
- Renamed utility function:
isDataURL→isDataUrl. - Removed unused exports:
tail()anddebugPrint()from helpers/functions.
New Features
rowClassName prop: pass a callback to apply custom class names to individual rows (#205)
<SmartDataTable
data={data}
rowClassName={(rowData, rowIndex) =>
rowIndex % 2 === 0 ? 'odd-row' : 'even-row'
}
/>- ESM output: the library now ships both ES module and UMD builds, with conditional exports in
package.json - CSS import alias:
import 'react-smart-data-table/css'now works alongside the full path
Bug Fixes
- Fixed stale state read in row deletion by using
setStatecallback form (#203)
Performance
- Extracted
DataRowas a memoized component to avoid re-rendering unchanged rows (#201) - Extracted table logic into dedicated hooks (#201)
Infrastructure
- Migrated build tooling from Webpack + Babel to Vite 8 (#202)
- Migrated test runner from Jest to Vitest 4 with
happy-dom(#202) - Migrated GitHub Pages deployment from gh-pages branch to GitHub Actions workflow (#204)
- Replaced
@withshepherd/fakerwith@faker-js/fakerin the example app - Removed 21 devDependencies, added 5
- Upgraded to TypeScript 6
What's Changed
- Bump terser from 5.14.1 to 5.14.2 by @dependabot[bot] in #75
- Bump loader-utils from 2.0.2 to 2.0.3 by @dependabot[bot] in #76
- Add CodeQL workflow for GitHub code scanning by @lgtm-com[bot] in #77
- Bump loader-utils from 2.0.3 to 2.0.4 by @dependabot[bot] in #78
- Bump decode-uri-component from 0.2.0 to 0.2.2 by @dependabot[bot] in #79
- Bump json5 from 1.0.1 to 1.0.2 by @dependabot[bot] in #81
- Bump webpack from 5.73.0 to 5.76.0 by @dependabot[bot] in #82
- Bump yaml from 2.1.1 to 2.2.2 by @dependabot[bot] in #83
- Bump semver from 6.3.0 to 6.3.1 by @dependabot[bot] in #85
- Bump tough-cookie from 4.0.0 to 4.1.3 by @dependabot[bot] in #84
- Bump word-wrap from 1.2.3 to 1.2.4 by @dependabot[bot] in #86
- Bump postcss from 8.4.14 to 8.4.31 by @dependabot[bot] in #87
- Bump @babel/traverse from 7.18.5 to 7.23.2 by @dependabot[bot] in #88
- deps: upgrade to latest by @joaocarmo in #95
- deps: upgrade to latest some more by @joaocarmo in #99
- chore: replace yarn with pnpm by @joaocarmo in #100
- refactor: remove prop types by @joaocarmo in #101
- Bump @types/react from 18.3.5 to 18.3.12 by @dependabot[bot] in #119
- Bump typescript-eslint from 8.5.0 to 8.18.0 by @dependabot[bot] in #132
- Bump @eslint/js from 9.10.0 to 9.16.0 by @dependabot[bot] in #130
- Bump babel-loader from 9.1.3 to 9.2.1 by @dependabot[bot] in #104
- Bump http-proxy-middleware from 2.0.6 to 2.0.7 by @dependabot[bot] in #135
- Bump cross-spawn from 7.0.3 to 7.0.6 by @dependabot[bot] in #134
- Bump nanoid from 3.3.7 to 3.3.8 by @dependabot[bot] in #133
- Bump eslint from 9.10.0 to 9.17.0 by @dependabot[bot] in #140
- Bump @babel/preset-typescript from 7.24.7 to 7.26.0 by @dependabot[bot] in #139
- Bump webpack-dev-server from 5.1.0 to 5.2.0 by @dependabot[bot] in #138
- Bump globals from 15.9.0 to 15.14.0 by @dependabot[bot] in #137
- Bump mini-css-extract-plugin from 2.9.1 to 2.9.2 by @dependabot[bot] in #141
- Bump @babel/runtime from 7.25.6 to 7.27.0 by @dependabot[bot] in #153
- Bump @babel/plugin-transform-runtime from 7.25.4 to 7.26.10 by @dependabot[bot] in #151
- Bump dependabot/fetch-metadata from 2.2.0 to 2.3.0 by @dependabot[bot] in #146
- Bump webpack from 5.94.0 to 5.99.0 by @dependabot[bot] in #154
- chore(ci): enable trusted publishing by @joaocarmo in #198
- feat: modernise by @joaocarmo in #199
- Bump github/codeql-action from 3 to 4 by @dependabot[bot] in #195
- Bump dependabot/fetch-metadata from 2.3.0 to 2.4.0 by @dependabot[bot] in #162
- build: update workflow-dispatch action from v1.2.4 to v1.3.1 by @joaocarmo in #200
- feat: performance optimisations by @joaocarmo in #201
- refactor: migrate to vite by @joaocarmo in #202
- refactor: use functional setState to avoid stale state issues by @joaocarmo in #203
- ci: add GitHub Pages deployment workflow by @joaocarmo in #204
- feat: add rowClassName prop to enable custom row styling by @joaocarmo in #205
- refactor: rename constants and function names to use camelCase by @joaocarmo in #206
- chore: move change case to externals by @joaocarmo in #207
- refactor: remove unused functions and update peer dependency by @joaocarmo in #208
- chore: ignore test helpers by @joaocarmo in #209
New Contributors
- @lgtm-com[bot] made their first contribution in #77
Full Changelog: v0.16.0...v0.17.0