Column Reordering
Drag and drop column headers to reorder columns.
⠿ ID
⠿ Name
⠿ Email
⠿ Department
⠿ Salary
50 rows · Drag column headers to reorder
Enable reordering and call reorderColumn:
const { columnOrder, reorderColumn } = useVirtualTable({
data,
columns,
enableColumnReordering: true,
});
// On drop:
reorderColumn('sourceId', 'targetId');| Option | Type | Default |
|---|---|---|
enableColumnReordering | boolean | false |
columnOrder | ColumnOrderState | — |
onColumnOrderChange | (state) => void | — |