Migration Guide: API naming (v4.0.5)

In Simple Table v4.0.5, several props and types are renamed for clearer naming. Update your code to the new names below — the old names no longer work.

Breaking change

  • Consumers must switch every renamed prop and type to its new name. That includes table props, type imports, and any code that reads column headers (getHeaders(), renderers, column callbacks).
  • Leave isSelectionColumn as-is — it was not renamed.
  • See the changelog for the 4.0.5 entry.

Rename list

Old nameNew nameNotes
HeaderObjectColumnDefCore type
ReactHeaderObjectReactColumnDef
VueHeaderObjectVueColumnDef
AngularHeaderObjectAngularColumnDef
SolidHeaderObjectSolidColumnDef
SvelteHeaderObjectSvelteColumnDef
defaultHeaderscolumnsVue: :default-headers → :columns
editColumnsenableColumnEditor
editColumnsInitOpenenableColumnEditorInitOpen
shouldPaginateenablePagination
onGridReadyonTableReady
useHoverRowBackgroundhoverRowBackground
useOddColumnBackgroundoddColumnBackground
useOddEvenRowBackgroundoddEvenRowBackground
isEditableeditableAlso update any code that reads this from headers
isSortablesortableAlso update any code that reads this from headers
isEssentialessentialAlso update any code that reads this from headers

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.5 (or later).
  2. Rename each prop and type using the table above. A good starting point is defaultHeaders columns and the column flags (sortable / editable / essential).
  3. Update type imports from *HeaderObject to *ColumnDef / ColumnDef.
  4. Run typecheck and fix any remaining old names.