rhwilr/vue-nestable

Disable area within slot

ainsleyclark opened this issue · 3 comments

Thank you for the great package.

I'm just wondering how to disable the dragging on a particular area off the draggable element.
For example, I don't want to user to be able to drag the H2, only the H1.

<vue-nestable-handle slot-scope="{ item }" :item="item">
	<h1>Hello</h1>
	<h2>No Drag</h2>
</vue-nestable-handle>

Hope that makes sense and thank you in advance.

Try setting pointer-events: none; on the h2 element.

I've already tried that, not sure if there is an alternative?

Many thanks.

This depends on your usage. Another option could be to catch the events the handle listenes to and prevent propagation.

There is no special property in the library to do this.