title: Invalid handler for event "click": got undefined... Vue.js
body: <p>I'm new to Vue.js and I'm working with modals. I'm using the <code>Buefy</code> framework mostly. This is my example code:</p>
  <pre><code>&lt;template&gt;
      &lt;section&gt;
          &lt;button class=&quot;button is-primary is-small&quot; @click=&quot;addModal = true&quot;&gt;
                &lt;span&gt;Insert New&lt;/span&gt;
              &lt;/button&gt;
  
          &lt;b-modal :active.sync=&quot;addModal&quot;
                   has-modal-card
                   trap-focus
                   :destroy-on-hide=&quot;false&quot;
                   aria-role=&quot;dialog&quot;
                   aria-modal&gt;
              &lt;modal-form v-bind=&quot;formProps&quot;&gt;&lt;/modal-form&gt;
          &lt;/b-modal&gt;
      &lt;/section&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  const ModalForm = {
    props: [&quot;tagName&quot;, &quot;moreFields&quot;],
    template: `
              &lt;form action=&quot;&quot;&gt;
                  &lt;div class=&quot;modal-card&quot; style=&quot;width: auto&quot;&gt;
                      //input fields here
                      &lt;footer class=&quot;modal-card-foot&quot;&gt;
                          &lt;button class=&quot;button&quot; type=&quot;button&quot; @click=&quot;$parent.close()&quot;&gt;Close&lt;/button&gt;
                          &lt;button class=&quot;button is-primary&quot; @click=&quot;addTag&quot;&gt;Add Tag&lt;/button&gt;
                      &lt;/footer&gt;
                  &lt;/div&gt;
              &lt;/form&gt;
          `,
  };
  export default {
    components: {
      ModalForm,
    },
    data() {
      return {
        data: {
          tagName: &quot;&quot;,
        },
        addModal: false,
      };
    },
    methods: {
      addTag() {
        if (this.data.tagName.trim().length &gt; &quot;&quot;) {
          console.log(mydata);
        }
      },
    },
  };
  &lt;/script&gt;
  </code></pre>
  <p>However, when I try to click the <code>Add Tag</code> button, I get the error <code>Invalid handler for event &quot;click&quot;: got undefined...</code>
  There seems to be so many issues with this and I didn't want to duplicate a post, but I've searched around the site and mostly people have typo issues (<code>method</code> instead of <code>methods</code>). Would it be because of the scope of the modal? That somehow <code>addTag</code> isnt visible to it?</p>
  <p>How would I fix this?</p>