Migration Guide: API naming (v4.0.2)

Simple Table v4.0.2 introduces clearer public names that match how people talk about tables (columns, not “headers”; enable flags instead of should*/use* prefixes). Old names still work as aliases — update when convenient.

Compatibility

  • Non-breaking. Preferred names are aliases. Existing defaultHeaders, HeaderObject, and the other legacy names continue to work.
  • When both old and new props are passed, the preferred name wins (e.g. columns over defaultHeaders).
  • Docs and examples now use only the preferred names. See the changelog for the 4.0.2 entry.

Rename list

Old namePreferred nameNotes
HeaderObjectColumnDefCore type alias; both names remain valid at runtime/types.
ReactHeaderObjectReactColumnDef
VueHeaderObjectVueColumnDef
AngularHeaderObjectAngularColumnDef
SolidHeaderObjectSolidColumnDef
SvelteHeaderObjectSvelteColumnDef
defaultHeaderscolumnsVue: :default-headers → :columns
editColumnsenableColumnEditor
editColumnsInitOpenenableColumnEditorInitOpen
shouldPaginateenablePagination
onGridReadyonTableReady
useHoverRowBackgroundhoverRowBackground
useOddColumnBackgroundoddColumnBackground
useOddEvenRowBackgroundoddEvenRowBackground
isEditableeditableColumn-level flag
isSortablesortableColumn-level flag
isEssentialessentialColumn-level flag

Before / after

Before

React TSX
1import { SimpleTable } from "@simple-table/react";
2import type { ReactHeaderObject } from "@simple-table/react";
3
4const headers: ReactHeaderObject[] = [
5 { accessor: "name", label: "Name", width: "1fr", isSortable: true, isEditable: true },
6];
7
8<SimpleTable
9 defaultHeaders={headers}
10 rows={rows}
11 editColumns
12 shouldPaginate
13 onGridReady={() => {}}
14 useHoverRowBackground
15/>

After

React TSX
1import { SimpleTable } from "@simple-table/react";
2import type { ReactColumnDef } from "@simple-table/react";
3
4const columns: ReactColumnDef[] = [
5 { accessor: "name", label: "Name", width: "1fr", sortable: true, editable: true },
6];
7
8<SimpleTable
9 columns={columns}
10 rows={rows}
11 enableColumnEditor
12 enablePagination
13 onTableReady={() => {}}
14 hoverRowBackground
15/>

Suggested migration steps

  1. Upgrade to 4.0.2 (or later). Your app should keep working with no changes.
  2. Find/replace using the table above — start with defaultHeaders columns and framework *HeaderObject types → *ColumnDef.
  3. Replace column flags isSortable / isEditable / isEssential with sortable / editable / essential. Do not rename isSelectionColumn.
  4. Run your typecheck — preferred names are fully typed on all adapters.

Next: Quick start · API reference · Changelog