I have implemented ngx-sortable , and right now, the whole element is a trigger (draggable) , I need to sort an item.
(我已经实现了ngx-sortable ,现在,整个元素是一个触发器(可拖动),我需要对一个项目进行排序。)
eg I want to sort the items by using the grey handle on the left, and not the whole item itself:
(例如,我想使用左侧的灰色手柄而不是整个项目本身对项目进行排序:)
<ngx-sortable [items]="items" [listStyle]="listStyle" (listSorted)="listOrderChanged($event)">
<ng-template let-item>
<div class="categories-cont d-flex justify-content-between align-items-center">
<div class="cont-drag-icon"><i class="icon icon-drag"></i></div>
<div class="cont d-flex align-items-center w-100">
<div class="cont-title w-100" i18n>{{item.name}}</div>
<div class="cont-act" (click)="deleteItem(item)"><i class="icon icon-trash"></i></div>
</div>
</div>
</ng-template>
</ngx-sortable>
ask by Tanasos translate from so