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

IgxGrid: Row drag not always working #11941

Closed
Timmeeeey opened this issue Aug 4, 2022 · 2 comments · Fixed by #12005
Closed

IgxGrid: Row drag not always working #11941

Timmeeeey opened this issue Aug 4, 2022 · 2 comments · Fixed by #12005
Assignees
Labels
🐛 bug Any issue that describes a bug 🔥 severity: high grid: row-drag version: 14.0.x ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@Timmeeeey
Copy link

Description

If you drag a row somewhere and then try to drag it again somewhere else then sometimes this doesn't work.

  • igniteui-angular version: 14.x
  • browser: Chrome

Steps to reproduce

https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/row-drag#row-reordering-demo

  1. Drag a row somewhere
  2. Try to drag the same row again (you might have to try a few times)

Result

Sometimes the row can't be dragged again.

Expected result

The row should always be draggable.

Attachments

2022-08-04_08h42_30

@Timmeeeey Timmeeeey added the 🐛 bug Any issue that describes a bug label Aug 4, 2022
@Lipata Lipata self-assigned this Aug 4, 2022
@dafo dafo self-assigned this Aug 18, 2022
@Lipata Lipata added 🛠️ status: in-development Issues and PRs with active development on them and removed 🆕 status: new labels Aug 19, 2022
@dafo
Copy link
Contributor

dafo commented Aug 22, 2022

@Timmeeeey can you please tell me if you see any error in the Console when this issue is reproduced?

@Timmeeeey
Copy link
Author

@dafo
Most of the time when dragging a row this error appears:

Uncaught TypeError: Cannot read properties of null (reading 'style')
    at get ghostLeft [as ghostLeft] (infragistics-igniteui-angular.mjs:15278:43)
    at AnimationFrameAction.<anonymous> (infragistics-igniteui-angular.mjs:16091:17)
    at AnimationFrameAction._execute (AsyncAction.js:53:18)
    at AnimationFrameAction.execute (AsyncAction.js:41:28)
    at AnimationFrameScheduler.flush (AnimationFrameScheduler.js:11:33)
    at AnimationFrameAction.js:14:125
    at timer (zone.js:2378:41)
    at _ZoneDelegate.invokeTask (zone.js:406:31)
    at Zone.runTask (zone.js:178:47)
    at invokeTask (zone.js:487:34)

This is the corresponding code in IgxDragDirective:

get ghostLeft() {
    return parseInt(this.ghostElement.style.left, 10) + this._ghostHostX;
}

@dafo dafo added ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed 🛠️ status: in-development Issues and PRs with active development on them labels Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Any issue that describes a bug 🔥 severity: high grid: row-drag version: 14.0.x ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants