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

Using custom drag ghost template for the IgxDrag directive with ngFor inside does not get updated automatically. #13346

Closed
skrustev opened this issue Aug 3, 2023 · 0 comments · Fixed by #13351
Assignees
Labels
🐛 bug Any issue that describes a bug drag-drop version: 15.1.x ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@skrustev
Copy link
Member

skrustev commented Aug 3, 2023

Description

When applying a drag ghost template with for example ngFor inside it, it does not get automatically updated when expected, even though the ChangeDetectionStrategy is Default for the app.
Manually triggering change detection updates the template.

This is due to the drag ghost being created outside the zone.

  • igniteui-angular version: any
  • browser: any

Steps to reproduce

  1. Open the attached sample
  2. Drag element from the top container to the bottom
  3. Observe the ghost updating only when mouse hovers over the drop area

Result

The drag ghost template does not detect changes automatically.

Expected result

The drag ghost template should detect changes automatically.

Attachments

drag-ghost-template.zip

@skrustev skrustev changed the title Using custom drag ghost template for the IgxDrag directive does not get updated automatically. Using custom drag ghost template for the IgxDrag directive with ngFor inside does not get updated automatically. Aug 3, 2023
@skrustev skrustev added ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed 🆕 status: new labels Aug 4, 2023
ChronosSF pushed a commit that referenced this issue Aug 9, 2023
…13350)

* fix(drag): Fix ghost template not detecting changes automatically. #13346

* chore(*): fix sample lint
ChronosSF pushed a commit that referenced this issue Aug 9, 2023
…13349)

* fix(drag): Fix ghost template not detecting changes automatically. #13346

* chore(*): fix sample lint
ChronosSF pushed a commit that referenced this issue Aug 9, 2023
…13351)

* fix(drag): Fix ghost template not detecting changes automatically. #13346

* chore(*): fix sample lint

---------

Co-authored-by: Deyan Kamburov <[email protected]>
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 drag-drop version: 15.1.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.

2 participants