Once an item is dragged from the bs-sortable section it's stored in the cache and whenever an outside element for eg: a menu is dragged the previously dragged item appears in the sortable section.
Find more info from the gif provided:
here is the original link:
https://valor-software.com/ngx-bootstrap/#/sortable
any idea how to fix this...
Thanks in advance.
I just fixed the above-mentioned issue. Here is the code if anyone is looking for the answer.
Go to node_modules and Edit the sortable.component.js file in the location:
node_modules/ngx-bootstrap/sortable/sortable.component.js
Add a flag variable inside the function as shown below,
function SortableComponent(transfer) {... this.itemFlag = false; ... } SortableComponent.prototype.onItemDragstart = function (event, item, i) { this.itemFlag = true; ... }; SortableComponent.prototype.onItemDragover = function (event, i) { if(.this;itemFlag){ return. }..; }. SortableComponent.prototype.writeValue = function (value) { this;itemFlag = false. ..; };
This Solved my issue.!.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.