A deprecated generic table component that renders tabular data with support for sorting, filtering, row selection, bulk actions, pagination (cursor and page-based), infinite scroll, and optional row-reorder animations via lazy-loaded Framer Motion. ## Key Components | Export / Symbol | Description | |---|---| | `Table` | Main generic table component (deprecated — use `DataTable` from `data-table` instead) | | `injectSyntheticColumns` | Internal helper that appends row-action buttons and/or chevron-link columns to the column definition array | | `TableProps` | Type imported from `./types` that defines all accepted props | | `useTableMotion` | Hook that lazily loads Framer Motion for opt-in row-reorder FLIP animations | ## Usage Example ```typescript import { Table } from './table' type User = { id: string; name: string; email: string } const columns = [ { key: 'name', label: 'Name', renderCell: (u: User) => u.name }, { key: 'email', label: 'Email', renderCell: (u: User) => u.email }, ] data={users} columns={columns} rowKey="id" loading={isLoading} emptyMessage="No users found" skeletonRows={5} onRowClick={(user) => console.log('clicked', user)} rowActions={[ { label: 'Delete', onClick: (user) => deleteUser(user.id), }, ]} cursorPagination={{ hasNextPage: true, hasPreviousPage: false, onNext: fetchNext, onPrevious: fetchPrev, onReset: resetCursor, }} selectable selectedRows={selected} onSelectionChange={setSelected} animateRowReorder /> ``` ## Notable Behaviors - **Synthetic columns** — `rowActions` / `renderRowActions` append an actions column; `rowHref` appends a chevron navigation column. Both use `data-no-row-click` to prevent event bubbling to the row click handler. - **Infinite scroll** — Uses an `IntersectionObserver` on a 1 px sentinel `div` with a `200px` root margin to call `onLoadMore` before the user hits the bottom. - **Height stability** — When infinite scroll is inactive, invisible placeholder rows fill the remaining `skeletonRows` quota to prevent layout shift. - **Framer Motion** — Loaded in its own lazy chunk only when `animateRowReorder` is `true`; rows are wrapped in a `LayoutGroup` for FLIP reorder transitions. > ⚠️ **Deprecated:** Prefer [`DataTable`](https://github.com/flamingo-stack/openframe-oss-lib/blob/main/src/components/data-table) for new implementations.