swimlane / ngx-dnd

🕶 Drag, Drop and Sorting Library for Angular2 and beyond!

Home Page:https://swimlane.github.io/ngx-dnd/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add id to item on ngx-dnd-container model

lehung151292 opened this issue · comments

I have created a script on:
https://angular-dvvd5p.stackblitz.io/
But the issue is I would like to add the id on the dropped item on the Drawing Area, but I can't see possible solution.
Is there any way I can modify the ngx-dnd-container model after drag?

Thanks
Ngan Le

commented

you can do that when onDrop() called.

  onDrop(e) {
    e.target.value.id = `some id eg: uuid` 
  }