We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It would be nice to have a click event on container so we can capture the active item.
Here is an example of code from the demo where I added (click) event.
<ngx-dnd-container dropZone="builder-target" [model]="model.children" [removeOnSpill]="true" [template]="template" [droppableItemClass]="droppableItemClass" (click)="setActiveItem($event)" (drag)="log($event)" (drop)="log($event)" (over)="log($event)" (out)="log($event)" (remove)="log($event)">
The text was updated successfully, but these errors were encountered:
While possible, my advice would be to handle that in the using the directives or item templates.
<ngx-dnd-container [model]="items"> <ng-template let-model="model"> <div (click)="setActiveItem(model)">{{model.name}}</div> </ng-template> </ngx-dnd-container>
In general I would recommend using the directives for anything more complex than a simple drag and drop lists.
<div class="ngx-dnd-container" ngxDroppable [model]="items"> <div class="ngx-dnd-item" ngxDraggable *ngFor="let item of items" (click)="setActiveItem(item)">{{item.name}}</div> </div>
Sorry, something went wrong.
If you think this doesn't work fro some reason please reopen.
No branches or pull requests
It would be nice to have a click event on container so we can capture the active item.
Here is an example of code from the demo where I added (click) event.
The text was updated successfully, but these errors were encountered: