0👍
Not sure how it works with the Vue framework but the mistake I did while using the suppressDragLeaveHidesColumns
option was the I was adding it in the columnDefs
instead of the gridOptions…
So, the correct way for using it with the vanilla javascript is
const gridOptions = {
columnDefs: columnDefs,
defaultColDef: {
width: 150,
},
suppressDragLeaveHidesColumns: true,
};
Other than that I guess you could try using the ag-grid-vue
tag like the following:
<ag-grid-vue :suppressDragLeaveHidesColumns="true"></ag-grid-vue>
That’s what I saw in their official example here: https://www.ag-grid.com/vue-data-grid/column-moving/#simple-example
Source:stackexchange.com