Alfred-Skyblue / vue-draggable-plus

Universal Drag-and-Drop Component Supporting both Vue 3 and Vue 2
https://vue-draggable-plus.pages.dev/en/
MIT License
2.72k stars 106 forks source link

Restricted column in custom Clone #97

Open web-mm opened 5 months ago

web-mm commented 5 months ago

I have a vue-drggable list in a for-loop and each list contains multiple items. Items can be cloned from one list to another. I don't want to allow the items to be moved to first position in any list. Is there any inbuilt functionality to achieve this?

First index in the each list should be irreplaceable.

Aaron-zon commented 5 months ago

https://alfred-skyblue.gitee.io/vue-draggable-plus/en/api/ filter Selector for items that should not be draggable

manish-maersk commented 4 months ago

I want each item to be draggable but first item in each list should not be replaceable.

Aaron-zon commented 4 months ago

I want each item to be draggable but first item in each list should not be replaceable.

set a special class for the first item in each column, and then handle it through the filter in the API to set this class as an element that is not draggable. image