question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bag already exists

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:22 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
kristianmandrupcommented, Nov 12, 2016

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 for find iterating through the list manually looking for object with matching name.

1reaction
kristianmandrupcommented, Nov 12, 2016

“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 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bag named: "section-bag" already exists · Issue #442
hi , I have a sectionComponent which has another component. section.component.html ` <*ngFor="let row of section.rows"> Loading.
Read more >
Getting error second time getting to page with ng2-dragula
I am trying to prevent user to move first element of dragulaService , the code works first time without any errors, but when...
Read more >
How to encrypt an already existing data bag? - Chef Questions
Hello,. While I believe it's possible to encrypt an existing data bag with 'knife data bag edit' by providing it an encryption key,...
Read more >
Everything I need already exists in me by rupi kaur Tote Bag
Everything I need already exists in me by rupi kaur Tote Bag. Designed and sold by Freyyyaaa. Also available on. Classic T-Shirt. From...
Read more >
Ets.Bag – ets v0.5.0 - HexDocs
Module for creating and interacting with :ets tables of the type :bag and ... doesn't add any records if any of the new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found