Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataTable Column Reordering Does Not Match Indicator #3395

Closed
Freddy090909 opened this issue Jul 14, 2017 · 1 comment
Closed

DataTable Column Reordering Does Not Match Indicator #3395

Freddy090909 opened this issue Jul 14, 2017 · 1 comment
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Freddy090909
Copy link

Freddy090909 commented Jul 14, 2017

I'm submitting a ... (check one with "x")

[ X ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)
http://plnkr.co/edit/fDLCtnECy85PaxkizZUw?p=preview

Current behavior
Column reordering has an issue when dragging columns. When you attempt to drag+drop a column, where the column lands is determined by which side of the "column seperator" you dropped on.

Expected behavior
I expect that the column should be dropped between the columns indicated by the drag+drop arrow.

Minimal reproduction of the problem with instructions
My plunkr above should be enough to reproduce this (note this problem also exists on the demo page at https://www.primefaces.org/primeng/#/datatable/colreorder).

Steps (left -> right):

  1. Click and drag "Vin" so that the arrow marks it to be dropped between "Year" and "Brand".
  2. Drop "Vin" with your mouse hovering to the >right< of the drag+drop arrow (over "Brand").
  3. Your columns should now show "Year", "Brand", "Vin", "Color". Expectation is "Year", "Vin", "Brand", "Color".

Steps (right -> left):

  1. Click and drag "Color" so that the arrow marks it to be dropped between "Vin" and "Year".
  2. Drop "Color" with your mouse hovering to the >left< of the drag+drop arrow (over "Vin").
  3. Your columns should now show "Color", "Vin", "Year", "Brand". Expectation is "Vin", "Color", "Year", "Brand".

What is the motivation / use case for changing the behavior?
I believe this is a bug.

Please tell us about your environment:
OS: Win10
IDE: VS 2017

  • Angular version: 4.2.2

  • PrimeNG version: 4.1.0

  • Browser: Chrome Version 59.0.3071.115 / IE 11

  • Language: TypeScript 2.3.4

  • Node (for AoT issues): node --version = v6.11.1

@cagataycivici cagataycivici self-assigned this Aug 23, 2017
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Aug 23, 2017
@cagataycivici cagataycivici modified the milestones: 4.1.4, 4.2 Aug 23, 2017
@dbmbm
Copy link

dbmbm commented Oct 2, 2017

this should not be closed, the bug still exists in 4.2

http://plnkr.co/edit/QGx803B8GVa9VWGgaNaQ?p=preview

It seems that the dropIndex is wrong: when you show the indicator (while dragging) you do some consideration about the destination column center (see onColumnDragover(event) ) while when you do the actual reorder, you don't do the same consideration (see onColumnDrop(event)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

3 participants