I'm reporting a documentation issues who hit me in the past; today I found that a customer has been confused in the same way, so I think that something can be done.
The documentation says:
dragula(containers?, options?)
By default, dragula will allow the user to drag an element in any of the containers and drop it in any other container in the list...
The term containers here is not clear. You can be confused and try to pass to dragula a list of containers that match draggable elements.
I'm reporting a documentation issues who hit me in the past; today I found that a customer has been confused in the same way, so I think that something can be done.
The documentation says:
The term containers here is not clear. You can be confused and try to pass to
dragula
a list of containers that match draggable elements.In brief: if I have something like...
...you can be confused and try to call
dragula(document.querySelector('element'))
.What probably confuses most: in a simple usecase you only have one container of draggable elements, for a very simple example of usage will be:
But you got an error, as you must to pass an array.
So: my suggestion is that documentation provides an overview of HTML used.