Description
REQUIRED: Before filing a bug report
Change each [ ]
to [x]
when you have done it.
- [ x ] My issue title starts with
[bug report]
- [ x ] I have read the README, especially the 'classic blunders' section, and the dragula docs.
- [ x ] I have searched through the
ng2-dragula
issues for related problems, including closed issues. - [ x ] I have browsed through the issues labeled "future reference" for problems that have been solved before or have a known workaround.
- [ x ] I am using the latest version of
ng2-dragula
.
Describe the bug (required)
A clear and concise description of what the bug is. What did you do, and what
did you expected to happen? What happened instead?
To Reproduce (required)
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
If your issue appears in a larger codebase and it you can't pin down why it is
happening, please
- Fork this StackBlitz template
- Update it to the latest
ng2-dragula
- Modify it, and reproduce the issue
- Add a link to it here.
Screenshots (optional)
If applicable, add screenshots to help explain your problem.
<div [dragula]="'WorkOrder'" [(dragulaModel)]="day.WorkOrders"
class="__gridCellContainer"
[attr.data-row-id]="rowId" [attr.data-cell-id]="cellId"
[attr.data-tech-id]="tech.SapId" *ngIf="day.WorkOrders">
<work-order *ngFor="let workOrderEntry of day.WorkOrders; index as cellIndex"
[selectedWorkOrders]="selectedWorkOrders" ...... >
For normal flow its working fine but when something occured in the child component (e.g something change/updated)
we notice the placeholder of the "container" is totally change and drake unable to match the container with newly updated container (we also have put change detection to ensure the cycle being refresh)
Versions (required)
Version : 5.1.0
https://www.npmjs.com/package/ng2-dragula/v/5.1.0
Please state which versions of the following packages you have installed:
"@angular/core": "^18.2.9",
"ng2-dragula": "^5.1.0",
Browsers affected (optional)
Microsoft Edge
Is this a bug in a particular browser? If so, it's unlikely that it's a problem with ng2-dragula
. Instead, it is probably a bug in dragula
.
Additional context (optional)
<div [dragula]="'WorkOrder'" [(dragulaModel)]="day.WorkOrders" (dragulaModelChange)="WorkOrder = $event" class="__gridCellContainer" [attr.data-row-id]="rowId" [attr.data-cell-id]="cellId" [attr.data-tech-id]="tech.SapId"> <work-order *ngFor="let workOrderEntry of day.WorkOrders; index as cellIndex" [selectedWorkOrders]="selectedWorkOrders" [selectedWorkOrdersForMove]="selectedWorkOrdersForMove" [grid]="grid" [weekDays]="weekDays" [rowId]="rowId" [cellId]="cellId" [cellIndex]="cellIndex" [workOrderEntry]="workOrderEntry"
We are using NG2-Dragula but for some cases we found the bug inside the ng2-dragula
when the source of model is undefined eventhough we have define it in angular template as above
the issue has occured before drop event being hit -
and because source model undefined its throw unhandling exception inside library itself
Add any other context about the problem here.