dragula filter

Solutions on MaxInterview for dragula filter by the best coders in the world

showing results for - "dragula filter"
Axel
21 Feb 2020
1// change dagrula.provider.ts:
2drake.on('drag', (el: any, source: any) => {
3    dragElm = el;
4    dragIndex = (el.getAttribute('filter-index')) ? +el.getAttribute('filter-index') : this.domIndexOf(el, source);
5});
6
7HTML:
8<div [dragula]='dragType' [dragulaModel]='arraylist'>
9  <div  *ngFor="let item of arraylist" [attr.filter-index]="arraylist.indexOf(item)">
10    <!-- HTML here -->
11  </div>
12</div>
13