Search code examples
javascriptvue.jsvuexvue-tables-2

Undefined value in vuex when clicking router view


I'm using the vue-tables-2 component, and setting the option to use Vuex:

Vue.use(ClientTable, [], true, null)

I have a <router-view> in my table cell, linking to another page, and when i click it, i get an error in vuex about undefined data.

vuex.js:34 Uncaught TypeError: Cannot read property 'data' of undefined
    at VueComponent.tableData (vuex.js:34)
    at Watcher.get (vue.common.js:3035)
    at Watcher.evaluate (vue.common.js:3142)
    at VueComponent.computedGetter [as tableData] (vue.common.js:3427)
    at VueComponent../node_modules/vue-tables-2/compiled/methods/row-was-clicked.js.module.exports (row-was-clicked.js:9)
    at Proxy.boundFn (vue.common.js:187)
    at invoker (vue.common.js:1939)
    at HTMLTableRowElement.fn._withTask.fn._withTask (vue.common.js:1774)

is there a way to tell vuex that im not using it anymore when i navigate away from this component?


Solution

  • This is resolved. Here is the Github issue: https://github.com/matfish2/vue-tables-2/issues/369