donmbelembe / vue-dragscroll

A vue directive to make a scrollable element scroll by draging to the scroll direction
https://vue-dragscroll.clebinfosys.com/
MIT License
258 stars 32 forks source link

Implement data-dragscroll-nested, data-no-dragscroll-nested #79

Open Kasheftin opened 3 years ago

Kasheftin commented 3 years ago

We heavily use vue-dragscroll in our application. There're a lot of draggable elements that should not trigger vue-dragscroll behavior. That's why we use vue-dragscroll:nochilddrag. Then, some elements should trigger vue-dragscroll, and there data-dragscroll attribute is in use.

The issue is the layout is quite complex, it consists on multiple nested containers, and vue-dragscroll:nochilddrag leads to the requirement to add data-dragscroll on every node. There's a drag-scroll table header with columns (data-dragscroll), every one has a title (data-dragscroll), the button (data-dragscroll) with the icon (data-dragscroll) etc.

It would be quite convenient to have something like data-dragscroll-nested that should propagate the behavior down to all the child nodes as well as data-no-dragscroll-nested for the reverse behavior.