vue-dragula: Bag already exists
When creating multiple directives with the same bag, the following error is thrown…
<div class="wrapper">
<div class="container" v-dragula="colOne" bag="first-bag">
<div v-for="text in colOne" @click="onClick">{{text}} [click me]</div>
</div>
<div class="container" v-dragula="colTwo" bag="first-bag">
<div v-for="text in colTwo">{{text}}</div>
</div>
</div>
Uncaught Error: Bag named: “test” already exists.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 22 (7 by maintainers)
I think the bags concept is very confusing. What you are trying to achieve is a map of
name: dragula instance (drake)
so just use an Object, also much faster lookup that what you are using forfind
iterating through the list manually looking for object with matching name.“You can put filterContainer as a component global variable, update it on ready, or use id to match containers.” WTF!? Don’t understand this gibbidy-gack! @Astray-git Please show an example for Vue 2 😃