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

[Grid] Incorrect target column field after column reordering #4423

Open
mbechev opened this issue Oct 3, 2024 · 0 comments
Open

[Grid] Incorrect target column field after column reordering #4423

mbechev opened this issue Oct 3, 2024 · 0 comments

Comments

@mbechev
Copy link
Contributor

mbechev commented Oct 3, 2024

Description

The clipboard event returns an incorrect target.colField after reordering the columns of the Grid.

Steps To Reproduce

  1. Paste any value to the first 'Id' column cell. The target.colField will be 'Id'.
  2. Reorder the 'Id' column with any other.
  3. Paste any value to the first column cell.
  4. The target.colField is again 'Id' which is inaccurate since the 'Id' is no longer the first column.

https://stackblitz.com/edit/angular-dwvxqc

Actual Behavior

The clipboard takes into account the initial order of the columns only. The colField doesn't correspond to the actual column field after reordering.

Expected Behavior

The colField must correspond to its real column field.

Temporary Workaround

Sort the columns by their updated orderIndex and find the correct target column field. Once having it, the function responsible for updating the records could be updated accordingly:

https://stackblitz.com/edit/angular-dwvxqc-155hpq?file=src%2Fapp%2Fapp.component.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant