Loading...
Loading...
Read and control Table v9 state in octane. Use for tracked reads, subscriptions, controlled slices, and framework-specific reactive boundaries.
npx skill4agent add tanstack/table table-stateintent load @tanstack/table-core#table-stateuseTabletable.state.get()table.store.statetable.Subscribeimport { useState } from 'octane'
import {
rowPaginationFeature,
tableFeatures,
useTable,
} from '@tanstack/octane-table'
const features = tableFeatures({ rowPaginationFeature })
const columns = [{ accessorKey: 'name' }]
const data = [{ name: 'Ada' }]
function PageStatus() @{
const [pagination, setPagination] = useState({ pageIndex: 0, pageSize: 20 })
const table = useTable({
features,
columns,
data,
state: { pagination },
onPaginationChange: setPagination,
})
<button onClick={() => table.nextPage()}>
Page {String(table.state.pagination.pageIndex + 1)}
</button>
}<table.Subscribe>useTable@tanstack/octane-storestatenode_modules/@tanstack/octane-table/src/index.d.ts*.tsrx.d.tssrc/types.ts@tanstack/table-core/dist/