Skip to content

Commit d1631c4

Browse files
committed
Add reorderableColumns option to ObjectGridSchema; enable column reordering functionality
1 parent 9a27db7 commit d1631c4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/plugin-grid/src/ObjectGrid.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ export const ObjectGrid: React.FC<ObjectGridProps> = ({
426426
exportable: operations?.export,
427427
rowActions: hasActions,
428428
resizableColumns: schema.resizable ?? schema.resizableColumns ?? true,
429+
reorderableColumns: schema.reorderableColumns ?? false,
429430
className: schema.className,
430431
onSelectionChange: onRowSelect,
431432
};

packages/types/src/objectql.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,12 @@ export interface ObjectGridSchema extends BaseSchema {
245245
* Allows users to drag column borders to resize
246246
*/
247247
resizable?: boolean;
248+
249+
/**
250+
* Enable column reordering
251+
* Allows users to drag columns to reorder
252+
*/
253+
reorderableColumns?: boolean;
248254

249255
/**
250256
* Striped row styling

0 commit comments

Comments
 (0)