title: How to commit mutations in a Vuex store, from a Vuetify list, VueJS
body: <p>This follows on from my previous question : <a href="https://stackoverflow.com/questions/51322760/how-to-get-states-from-a-vuex-store-from-within-a-vuetify-list-vuejs/51323061?noredirect=1#comment89623058_51323061">How to get states from a Vuex store from within a Vuetify list, VueJs</a></p>
  
  <p>I understand how to get states from the store, but I am struggling commiting mutations from within a list.</p>
  
  <p>Here is my list :</p>
  
  <pre><code>export default{
      name: 'menuList',
      data() {
          return {
              show: true,
              items: [{
                      title: 'Do something',
                      icon: 'web',
                      event: function () {
                          this.$store.commit('UI/DoSomething', {
                              argument1: "argument1",
                              rootStore: this.$store
                          })
                      }
  
                  }
              ]
          }
      }
  }
  </code></pre>
  
  <p>I have to have the event in a function as, if I don't, the commit will run straight away. I only want it to run when I click the button.</p>
  
  <p>Here is my list creation : </p>
  
  <pre><code>&lt;template&gt;
    &lt;v-navigation-drawer v-model="show" right clipped app fixed hide-overlay permanent="true"&gt;
      &lt;v-list two-line&gt;
        &lt;template v-for="(item, index) in items"&gt;
          &lt;v-list-tile :key="item.title" @click="item.event()"&gt;
            &lt;v-list-tile-action&gt;
              &lt;v-icon&gt;{{item.icon}}&lt;/v-icon&gt;
            &lt;/v-list-tile-action&gt;
            &lt;v-list-tile-content&gt;
              &lt;v-list-tile-title v-html="item.title"&gt;&lt;/v-list-tile-title&gt;
            &lt;/v-list-tile-content&gt;
          &lt;/v-list-tile&gt;
          &lt;v-divider :key="index"&gt;&lt;/v-divider&gt;
        &lt;/template&gt;
      &lt;/v-list&gt;
    &lt;/v-navigation-drawer&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>When I wrap the commit with a function (so it doesn't execute automatically), the keyword 'this' refers to the object, not the Vue.</p>
  
  <p>I'm sure I'm missing something simple here, any ideas ?</p>