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.71k stars 106 forks source link

feat: add feature to disable individual draggable elements using class #133

Closed Aaron-zon closed 1 month ago

Aaron-zon commented 1 month ago

When the draggable element is appended with .dr-sub-disable or .drSubDisable, it will no longer be draggable. image chrome_TackiN7KRv

netlify[bot] commented 1 month ago

Deploy Preview for vue-draggable-plus ready!

Name Link
Latest commit 8dffe5621c294d5c6988f6c14c8de6a77b76002e
Latest deploy log https://app.netlify.com/sites/vue-draggable-plus/deploys/6638436d0a71900008f854c7
Deploy Preview https://deploy-preview-133--vue-draggable-plus.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Alfred-Skyblue commented 1 month ago

You can pass the selector to filter to disable dragging.

Aaron-zon commented 1 month ago

yes, the filter can achieve this effect, but perhaps having a dedicated class for disabling would be convenient. This feature was implemented based on issues #131, as I've noticed many inquiries about disabling issues. If it's not currently needed, I'll close it.

Alfred-Skyblue commented 1 month ago

I still think it's confusing to add specifically disabled selectors because I can't restrict what selectors the user can use unless it configures the filter, so I don't think I should be able to disable it internally.