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
isSelectionColumnas-is — it was not renamed. - See the changelog for the 4.0.5 entry.
Rename list
| Old name | New name | Notes |
|---|---|---|
HeaderObject | ColumnDef | Core type |
ReactHeaderObject | ReactColumnDef | — |
VueHeaderObject | VueColumnDef | — |
AngularHeaderObject | AngularColumnDef | — |
SolidHeaderObject | SolidColumnDef | — |
SvelteHeaderObject | SvelteColumnDef | — |
defaultHeaders | columns | Vue: :default-headers → :columns |
editColumns | enableColumnEditor | — |
editColumnsInitOpen | enableColumnEditorInitOpen | — |
shouldPaginate | enablePagination | — |
onGridReady | onTableReady | — |
useHoverRowBackground | hoverRowBackground | — |
useOddColumnBackground | oddColumnBackground | — |
useOddEvenRowBackground | oddEvenRowBackground | — |
isEditable | editable | Also update any code that reads this from headers |
isSortable | sortable | Also update any code that reads this from headers |
isEssential | essential | Also 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";34const headers: ReactHeaderObject[] = [5 { accessor: "name", label: "Name", width: "1fr", isSortable: true, isEditable: true },6];78<SimpleTable9 defaultHeaders={headers}10 rows={rows}11 editColumns12 shouldPaginate13 onGridReady={() => {}}14 useHoverRowBackground15/>
After
React TSX
1import { SimpleTable } from "@simple-table/react";2import type { ReactColumnDef } from "@simple-table/react";34const columns: ReactColumnDef[] = [5 { accessor: "name", label: "Name", width: "1fr", sortable: true, editable: true },6];78<SimpleTable9 columns={columns}10 rows={rows}11 enableColumnEditor12 enablePagination13 onTableReady={() => {}}14 hoverRowBackground15/>
Suggested migration steps
- Upgrade to
4.0.5(or later). - Rename each prop and type using the table above. A good starting point is
defaultHeaders→columnsand the column flags (sortable/editable/essential). - Update type imports from
*HeaderObjectto*ColumnDef/ColumnDef. - Run typecheck and fix any remaining old names.