-
-
Notifications
You must be signed in to change notification settings - Fork 206
Description
Description
Currently, I’m using RevoGrid with canMoveColumns enabled to allow column reordering.
The drag & drop reordering works visually, but I can’t find a clear way to detect when the order has changed
and then save the new column order (e.g., to user settings or local storage).
I’ve tried listening to related events like:
@columnorderchanged @beforecolumndragend @afteredit
and even adding custom listeners on the grid element,
but none seem to reliably fire after the columns are reordered in the UI.
<v-grid ref="revoGrid" :columns="columns" v-model:source="dataSource" :plugins="plugins" canMoveColumns :resize="true" @afteredit="handleAfterEdit" @pagechange="handlePageChange" />
Using version:
"@revolist/revogrid": "^4.17.0",
"@revolist/vue3-datagrid": "^4.17.0"
What I’m trying to do
I want to:
- Detect when a user reorders columns via drag and drop.
- Get the new column order (columns array in new order).
- Save it to user settings or local storage.
- Reapply it next time the grid is opened.
Something like:
revoGrid.addEventListener('afterColumnReorder', (e) => { const newOrder = e.detail.columns; saveUserSettings(newOrder); });
Expected Behavior:
RevoGrid should fire an event after a successful column reorder
with the updated column sequence so we can persist it.
Actual Behavior
No official event fires after reordering is completed.
It’s unclear how to hook into column drag/drop completion in a stable way.