API / Plugins / Base / Column Reorder
ColumnReorderPlugin
The ColumnReorderPlugin from @omnigrid/column-reorder-plugin reorders movable leaf columns when dragged before or after another column header.
Constructor
new ColumnReorderPlugin<T>(options?: ColumnReorderPluginOptions<T>)Options
Properties accepted by ColumnReorderPluginOptions<T>.
Callbacks
onChange: (columns: ColumnDef<T>[]) => voidCalled with the updated column definitions after a successful reorder.
Instance methods
register(api): () => voidSubscribes to column-drop events and reorders the column definitions.
moveColumn(sourceColumnId, targetColumnId, position): booleanMoves a movable column or group before or after a target column or group. Columns can move between groups but cannot cross pinned-column regions. Dropping after the final leaf in the final group places the column after that group.