Skip to content

v1.0.0-beta.0

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 13 Aug 20:11
· 367 commits to main since this release
9c6c088

Major Changes

  • 14f4c4d Thanks @Psvensso! - Types: the editing options are now a discriminated union. BREAKING for TypeScript consumers who passed an editing callback without editMode, onEditCommitBatch outside editMode: "batch", or editMode without getRowId — all previously broken at runtime, now compile errors.

  • 3f5269c Thanks @Psvensso! - Fuzzy quick search by default: TMDataGrid.Search now forgives typos and skipped characters, and while it is the only thing narrowing the grid the rows order by match quality. quickSearchMode: "contains" restores the old substring matching; an explicit globalFilterFn overrides both. Adds @tanstack/match-sorter-utils as a dependency.

  • 9f83cbc Thanks @Psvensso! - Persisted payloads gain a version stamp and are realigned against the current column set on restore. BREAKING: layouts stored by 0.x builds carry no stamp and are dropped once — users start from the default layout after upgrading.

  • b2f3207 Thanks @Psvensso! - The 1.0 wave opens. Beta releases may break API between versions; every break is named in its changeset. First changes: persisted layouts written by 0.x are dropped once (the payload gains a version field).

Minor Changes

  • 6f1b4db Thanks @Psvensso! - Adding and deleting rows: edit.addRow() opens a sticky entry block of editors under the header, edit.deleteRow reports immediately or marks for batch; newRowDefaults, onRowAdd, onRowDelete, and submitAll batches carrying added/deleted.

  • 5bcde97 Thanks @Psvensso! - Batch editing: drafts accumulate until edit.submitAll(), TMDataGrid.EditActions toolbar chrome, optional onEditCommitBatch for one save call covering every dirty row.

  • 7a8c056 Thanks @Psvensso! - between filter operator for number and date columns — an inclusive [min, max] pair, either end open when empty; the panel renders a From/To pair. meta.defaultFilterOperator picks the operator a fresh filter starts with. New labels: filterFrom, filterTo, operators.between.

  • 4b1985f Thanks @Psvensso! - onCellClick, onCellDoubleClick and onCellContextMenu on TMDataGrid.Table — { cell, row, column, event }, composing with selection, editing and the context menu rather than replacing them.

  • abaa3dc Thanks @Psvensso! - Cell editing (editMode: "cell"): one TanStack Form per editing row, built-in editors per column type, meta.validate / rowValidators with Standard Schema support, meta.editor for a custom editor, keyboard entry and onEditCommit. Adds @tanstack/react-form as a peer dependency.

  • b39eece Thanks @Psvensso! - @jielga/tmdatagrid/styles.layer.css: the stylesheet wrapped in @layer tmdatagrid, for consumers who state their cascade order.

  • ce9a3f8 Thanks @Psvensso! - Editing modes cellConfirm (✓/✕ beside the input, drafts survive blur) and row (generated edit lane pinned right, whole-row commit, cross-field rowValidators errors on the Save).

  • c8acb31 Thanks @Psvensso! - meta.editor takes a component, rendered as JSX so hooks are legal inside it. It receives the live TanStack Form field alongside the table context (TMDataGridEditorComponent, TMDataGridEditorArgs); define one at module scope so its identity is stable across renders.

  • da28796 Thanks @Psvensso! - Empty states: renderEmptyState on TMDataGrid.Table replaces the built-in empty messages, with hasActiveFilters distinguishing filtered-empty from truly-empty. A grid with no data and no filters now says labels.noRows ("No rows to show") instead of claiming filters matched nothing.

  • 9984dcd Thanks @Psvensso! - Custom filter controls: meta.filterControl replaces the filter panel's value slot with a component receiving the value-only TMDataGridFilterControlArgs contract — it reads the operator, writes the bare value, and the grid composes the stored filter. Four built-ins ship as named exports (DgRangeSliderFilter, DgDateRangeFilter, DgAutocompleteFilter, DgTriStateFilter), plus TMDataGridFilterValueInput, the default control, for fallbacks. New label: filterAll.

  • 992b7c1 Thanks @Psvensso! - Match highlighting: enableMatchHighlighting marks the matched text in default-rendered cells while a contains-family filter or the quick search is active. Contiguous occurrences only — a fuzzy typo-match shows no highlight — and columns with their own cell renderer opt out by existing. Colour via --dg-match-highlight-bg.

  • 2f105bf Thanks @Psvensso! - Per-row styling on TMDataGrid.Table: rowClassName and rowStyle (value or function of the row), and striped — stripes computed from view position so virtualization cannot shift them. Row colours go through --row-bg, keeping hover, selection and pinned cells intact.

  • 59d63ab Thanks @Psvensso! - resetSettings() on the api resets visibility, order, widths, pinning and grouping to a clean first visit; the columns panel's Reset button becomes "Reset layout" and calls it, scope stated in its tooltip.

  • a5a0daf Thanks @Psvensso! - enableRowNumbers: a generated row-number gutter, outermost left — numbers the current view, continues across pages, leaves group rows unnumbered, never exports.

  • 64eece3 Thanks @Psvensso! - Row pinning: enableRowPinning (boolean or per-row predicate) lets row.pin("top" | "bottom" | false) hold rows in sticky edge blocks — top under the header, bottom above the summary row — outside the scrolling order. Pinned rows survive filtering and paging, stale pinned ids are skipped rather than thrown on, and group rows never pin.

  • db99330 Thanks @Psvensso! - TMDataGrid.Table's rowStyle accepts CSS custom properties, and the type behind it is exported as TMDataGridRowStyle. Setting --row-bg is the documented way to colour a row, but the prop was typed as plain CSSProperties, so the documented usage did not compile.

  • 9d15d5e Thanks @Psvensso! - Scroll edges: a scroll-driven shadow under the sticky header while rows are beneath it (--dg-header-shadow-color), and onScrollToTop/Bottom/Left/Right on TMDataGrid.Table, firing once per edge arrival.

  • #13 64f48cd Thanks @Psvensso! - scrollToRow({ rowId, align }) on the api returned by useTMDataGrid. The grid is always virtualized, so a row far down the list has no element to scroll to — this moves the virtualizer instead. Answers false when the row is not in the current view (filtered out, on another page, or an unknown id) and scrolls nothing; a pinned row answers true without scrolling.

  • #13 f48a8cc Thanks @Psvensso! - A published testing contract, so a suite is written against structure rather than translated aria-labels. Every named piece of the grid carries data-dg-part — the chrome, panels, generated lanes and editors — narrowed by data-row-id / data-column-id where a part repeats. data-testid and id on <TMDataGrid> and aria-label on TMDataGrid.Table name a grid when a page holds several. Body cells always carry data-row-id, headers now carry data-column-id, and the grid publishes aria-busy and data-dg-row-count for tests to wait on. New Testing docs page covers the parts, the roles and Playwright.

Patch Changes

  • #13 573bea5 Thanks @Psvensso! - Center the empty/loading state in the visible scrollport, not the full column-track width, so it stays centered under horizontal scroll.

  • #13 184b1e8 Thanks @Psvensso! - Getting started docs: add installation (peer deps, beta pin note, MantineProvider) and import from the package name. The demo site now opens on it as a front page.

  • 6c7b71c Thanks @Psvensso! - Docs: rowSelectionMode/highlightSelectedRows corrected to the shipped selectionMode (four modes) and showSelectedBackground.