title: Vuejs click event from checkbox?
body: <p>I have a v-model on checkbox which values are assigned from a loop.
  I want the click event to invoke a funtion where I need to access the data of the checked ones. When a click is trigerred, If I log the state it doesnot print the current clicked data of the checkbox. It prints previous clicked checkbox data. Should a event must be passed and accessed data in the function?</p>
  <pre><code>&lt;div id=&quot;demo&quot;&gt;
    &lt;ul&gt;
      &lt;li v-for=&quot;mainCat in mainCategories&quot;&gt;
        &lt;input 
          type=&quot;checkbox&quot; 
          :value=&quot;mainCat.merchantId&quot;     
          id=&quot;mainCat.merchantId&quot; 
          v-model=&quot;checkedCategories&quot; 
          @click=&quot;check(checkedCategories)&quot;
        &gt; 
        {{mainCat.merchantId}}
      &lt;/li&gt;
    &lt;/ul&gt; 
    {{ checkedCategories }}
  &lt;/div&gt;
  </code></pre>
  <p>script:</p>
  <pre><code>var demo = new Vue({
    el: '#demo',
    data: {
      checkedCategories: [],
      mainCategories: [{
        merchantId: '1'
      }, {
      merchantId: '2'
      }] //testing with data use: [{done:false,content:'testing'}]
    },
    methods: {
      check: function(e) {
        console.log(this.checkedCategories,e)
      }
    }
  })
  </code></pre>
  <p>Js fiddle:<a href="http://jsfiddle.net/bmpfs2w2/" rel="noreferrer">http://jsfiddle.net/bmpfs2w2/</a></p>