I have issue when Im using vuex.
I have getters in namespaced module and I cant figurę out how to get the data with Ii when Im passing some arguments.
this.$store.getters.feeders.getFeedersById(id)
And in maper.
...mapGetters({
feeders: ['feeders/getFeedersById'](this.id)
Getting error like this getter is not a function. What else shoudl I do?
feedersById(state) {
return rowId => {
if (state.feedersArray.hasOwnProperty(rowId)) {
return state.feedersArray[rowId].map(id => state.feeders[id]);
}
}
},
feedersId() {
if (this.rowData) {
return this.$store.getters['feeders/feedersById'](this.rowData.ac_id);
}
}
Okey I had some mistake there and now it works properly. Thanks!! :)