Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## 5.3.0 - 2026-08-31

Version 5.3 adds a native known-total infinite-scroll footer and strengthens
the documented stable-row-identity contract without removing any public API.

### Changed

- Show the native total-record count as a count-only footer during infinite
scrolling when `totalRowCount` is supplied, while continuing to suppress
pagination controls.

### Documentation

- Use stable module-scope `getRowId` functions throughout the README examples,
matching the identity guidance for row state and virtualization.

### Validation

- Cover controlled `manualSorting` together with `infiniteScroll`, including
server-order preservation, sorting callbacks, and sentinel observation.
- 327 unit/integration tests across the shadcn, HeroUI, and The Gridcn
adapters, plus lint, package/demo typechecks and builds, public API snapshot,
packed-consumer build, and bundle budgets.

## 5.2.1 - 2026-08-13

Version 5.2.1 aligns the shadcn data-table search surface with the semantic
Expand Down
47 changes: 33 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ infinite loading, typed server data sources, and host-owned drag/upload
integrations. See
[`docs/API.md`](./docs/API.md) for the complete contract.

## 5.3.0 infinite-scroll footer

When `infiniteScroll.enabled` and `totalRowCount` are both supplied, the table
now keeps a native count-only footer visible while suppressing records-per-page
and pagination controls. Unknown-total infinite scrolling remains footerless.
No public prop or persisted-state format changed.

## 5.2.1 styling correction

Version 5.2.1 uses the shadcn `bg-input` surface for data-table search input
Expand Down Expand Up @@ -129,11 +136,11 @@ The previously planned wrapper API cleanup was ultimately deferred beyond
## Installation

```bash
pnpm add github:Dastari/data-table-pro#v5.2.1
pnpm add github:Dastari/data-table-pro#v5.3.0
```

This package is installed from GitHub refs. It is not published to npm.
Release tags such as `v5.2.1` include committed `dist/` output, so consumers
Release tags such as `v5.3.0` include committed `dist/` output, so consumers
do not need to allow package build scripts during install.

Peer dependencies:
Expand Down Expand Up @@ -183,14 +190,22 @@ or when the application preloads routes:
```tsx
import { DataTable } from "data-table-pro/virtual";

function getRowId<TRow extends { id: string }>(row: TRow) {
return row.id;
}

<DataTable
columns={columns}
data={rows}
getRowId={(row) => row.id}
getRowId={getRowId}
virtualization
/>;
```

Keep `getRowId` at module scope, as above, or memoize it with
`React.useCallback`. A new inline function on every render defeats the stable
identity contract used by row state, diagnostics, and virtualization.

The existing base entrypoints remain source-compatible with
`virtualization`. They load the virtual row/card implementation only when the
prop enables it and render a bounded initial set as the Suspense fallback
Expand Down Expand Up @@ -361,12 +376,16 @@ const columns: Array<DataTableColumnDef<Person>> = [
},
];

function getPersonRowId(person: Person) {
return person.id;
}

export function PeopleTable({ rows }: { rows: Array<Person> }) {
return (
<DataTable
columns={columns}
data={rows}
getRowId={(row) => row.id}
getRowId={getPersonRowId}
title="People"
/>
);
Expand Down Expand Up @@ -424,7 +443,7 @@ visible descendants proportionally.
<DataTable
columns={columns}
data={rows}
getRowId={(row) => row.id}
getRowId={getRowId}
toolbarQueryValue={query}
onToolbarQueryValueChange={setQuery}
/>
Expand All @@ -444,7 +463,7 @@ const apiRef = React.createRef<DataTableApi<Person>>();
apiRef={apiRef}
columns={columns}
data={rows}
getRowId={(row) => row.id}
getRowId={getRowId}
enableRowPinning
initialState={{ rowPinning: { top: ["important-id"], bottom: [] } }}
/>;
Expand All @@ -470,7 +489,7 @@ Toolbar search filters local/client-side data by default. Server-side tables can
<DataTable
columns={columns}
data={rows}
getRowId={(row) => row.id}
getRowId={getRowId}
manualFiltering
toolbarQueryValue={query}
onToolbarQueryValueChange={setQuery}
Expand All @@ -488,7 +507,7 @@ inventing a total:
<DataTable
columns={columns}
data={pageRows}
getRowId={(row) => row.id}
getRowId={getRowId}
manualPagination
pageIndex={pageIndex}
pageSize={pageSize}
Expand All @@ -508,7 +527,7 @@ configuration:
<DataTable
columns={columns}
data={rows}
getRowId={(row) => row.id}
getRowId={getRowId}
persistence={{
key: "people-table",
version: 2,
Expand Down Expand Up @@ -538,7 +557,7 @@ const [tableState, setTableState] = React.useState<DataTableState>(
apiRef={apiRef}
columns={columns}
data={rows}
getRowId={(row) => row.id}
getRowId={getRowId}
state={tableState}
onStateChange={setTableState}
/>;
Expand Down Expand Up @@ -580,7 +599,7 @@ or opt into the built-in table-options controls:
apiRef={apiRef}
columns={columns}
data={rows}
getRowId={(row) => row.id}
getRowId={getRowId}
savedViews={{
key: "people-table",
version: 1,
Expand Down Expand Up @@ -648,7 +667,7 @@ const columns: Array<DataTableColumnDef<Person>> = [
<DataTable
columns={columns}
data={people}
getRowId={(person) => person.id}
getRowId={getPersonRowId}
enableGrouping
initialState={{ grouping: ["team"] }}
/>;
Expand All @@ -664,7 +683,7 @@ clipboard handling independently:
<DataTable
columns={columns}
data={rows}
getRowId={(row) => row.id}
getRowId={getRowId}
interactiveGrid
enableCellSelection
clipboard={{
Expand Down Expand Up @@ -767,7 +786,7 @@ Example:
<DataTable
columns={columns}
data={rows}
getRowId={(row) => row.id}
getRowId={getRowId}
toolbarQueryValue={query}
onToolbarQueryValueChange={setQuery}
customToolbar={
Expand Down
2 changes: 1 addition & 1 deletion dist/adapter-virtual.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/adapter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/advanced.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions dist/chunk-3PL4XDZI.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/chunk-3PL4XDZI.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions dist/chunk-BUT7FBKJ.js

This file was deleted.

2 changes: 2 additions & 0 deletions dist/chunk-I5D5NFSR.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/chunk-BUT7FBKJ.js.map → dist/chunk-I5D5NFSR.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions dist/chunk-NL6LSUVL.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/chunk-NL6LSUVL.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion dist/heroui-virtual.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/heroui.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/thegridcn-virtual.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/thegridcn.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/virtual.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ table's first-class `grouping` / `onGroupingChange` contract.
| `cardClassName` | `string` | `undefined` | Applied to each card item wrapper in card mode. |
| `flexGrow` | `boolean` | `true` | Fills the remaining height of a constrained flex parent. |
| `showToolbar` | `boolean` | `true` | Controls the package toolbar region. |
| `showFooter` | `boolean` | `true` | Controls the pagination/record-count footer when infinite loading is not active. |
| `showFooter` | `boolean` | `true` | Controls the pagination/record-count footer. Infinite loading shows only the record count when `totalRowCount` is supplied. |

### Layout requirements

Expand Down Expand Up @@ -843,7 +843,7 @@ discarded.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `infiniteScroll` | `DataTableInfiniteScroll` | `undefined` | Enables sentinel-based load-more behavior and hides the pagination footer. Only one load request runs at a time; failures are reported through `onActionError`. |
| `infiniteScroll` | `DataTableInfiniteScroll` | `undefined` | Enables sentinel-based load-more behavior and hides pagination controls. When `totalRowCount` is supplied, a native count-only footer remains visible. Only one load request runs at a time; failures are reported through `onActionError`. |

### Virtualization props

Expand Down
11 changes: 11 additions & 0 deletions docs/Migration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Migration Guide

## 5.3.0 known-total infinite scrolling

No consumer migration is required. Tables using `infiniteScroll` continue to
hide pagination controls. If they also supply `totalRowCount`, the package now
renders its native record-count footer; omit `totalRowCount` or set
`showFooter={false}` to retain no footer. Applications that previously passed a
custom count-only footer child can remove that child after adopting 5.3.0.

Keep `getRowId` at module scope or memoize it with `React.useCallback`; the
README examples now consistently demonstrate that stable identity contract.

## 5.2.1 search surface styling

No consumer migration is required for 5.2.1. The shadcn adapter now uses
Expand Down
4 changes: 2 additions & 2 deletions docs/Roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Audit baseline:

Current implementation baseline:

- package version: 5.2.1
- package version: 5.3.0
- React/React DOM peers: 19.2.8
- TanStack Table: 9.1.2 with explicit features and no legacy hook
- TanStack Virtual: 3.14.9
- validation: 321 unit/integration tests, enforced coverage and declaration
- validation: 327 unit/integration tests, enforced coverage and declaration
snapshots, SSR/hydration tests, a packed-consumer build, and 12
Playwright behavior/accessibility/layout cases
- toolchain: TypeScript 7 CLI with the official TypeScript 6 compiler-API
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-table-pro",
"version": "5.2.1",
"version": "5.3.0",
"description": "Reusable React data table library with shadcn, HeroUI, and The Gridcn adapters.",
"type": "module",
"license": "MIT",
Expand Down
Loading