Drag and drop reordering of columns should allow for dropping only and not swapping
See original GitHub issueCurrently dragging and dropping columns swaps the columns, that is the dragged column and the column dragged into, with each other. Instead, there should be a way to allow column dragging so that it only drops it into position and shifts the other columns to the right.
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter
Current behavior Currently when you drag a column to the position of another column, it swaps the columns, so if you drag a column in a 10 column grid, that is at the very right of the grid, to a position in the beginning, it will swap the columns instead of simply shifting the first column to the right and placing the dragged column in its place.
Expected behavior See above.
Reproduction of the problem See any of the demo apps.
What is the motivation / use case for changing the behavior? Usually column drag and drop does not swap columns but instead shifts columns.
Please tell us about your environment: All
-
Table version: 0.8.x Latest
-
Angular version: 2.0.x 4.x
-
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X all
-
Language: [all | TypeScript X.X | ES6/7 | ES5] TypeScript
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:22 (2 by maintainers)
Top GitHub Comments
We’re currently working on a project where we needs this functionality of reordering columns and not swapping them. We decided to implement it by ourselves and created a PR. We hope it will be merged.
Hi, everyone! I had that same problem. I did this(Angular5, ngx-datatable 11.1.7):
In html:
In TS: