Skip to main content

All Questions

Tagged with
1 vote
1 answer
455 views

How to send a parameter to getters in vue?

I have a getter to check the product stock and amount of the cart. So here is my getters.js: export const checkStock = (state, productID) => { let stockAvailable = true; state.cart.forEach(...
magic bean's user avatar
1 vote
1 answer
614 views

Vuex only updating component when clicking on the button of the first row inside for loop

I am messing around with Vuex and I almost got it working, there's only this issue which is bothering me. You see, I have a product list, each product has its own "addToCart()" on-click ...
Sander Plomp's user avatar
0 votes
1 answer
57 views

Undefine getters error while page rendered in vue 2

This Is My Global state and shared component I set and defined getters here export default { getters: { loading(state) { return state.loading; }, statusMessage(state) { ...
khawar shah's user avatar
1 vote
1 answer
268 views

Can I make a getter recomputed when another getter changed in vuex?

I am using this getter in vuex: authority_count (state, getters) { return getters.dataView?.getUint16(4, true) || state.pack.authority_count; } I am expecting authority_count to be state.pack....
Rui's user avatar
  • 99
0 votes
1 answer
2k views

Vuex computed property not updating

I am having a hard time trying to update my component state based off a reference Id that I am using to display a result that lives in my store/vuex. Basically, what I want to happen is for when I ...
user3612986's user avatar
0 votes
3 answers
2k views

Vue getter returns undefined when page reload

I have a blog with some posts. When you click on the preview you will redirect on the page post. On the page of the post, I use a getter to load the correct post (I use the find function to return ...
stasera's user avatar
  • 96
0 votes
1 answer
980 views

nuxt : access globals variables stored in the vuex store

In my NUXT application, i have to share a global array for all my components. For example, this array contains the labels of the week : export const state = () => ({ days: [ { code: '1', ...
Ricou's user avatar
  • 1,026
1 vote
0 answers
1k views

Vuex getter wasn't updated after store mutation

I've created app using VueJS and Vuex. This code is used in store: const separateArticle = { state: {article: {}}, mutations: { LOAD_ARTICLE(state, id) { fetch(`http://...
Spike_Doc's user avatar
1 vote
2 answers
2k views

VueX Getter to filter unique id's from array

I want to filter an array (that contains objects), to grab each message that contains a unique correspondence_id. **Store contains 'messages' (with this structure): Getters where I want to filter it....
Otto's user avatar
  • 693
0 votes
2 answers
1k views

How to get only one column-set of array-data (vuejs2 getters)

My efWezlow array: [{"adres":"Something","w17_18":60,"w16_17":61,"w15_16":62,"w14_15":48,"w13_14":null}, ...{}] I have getters: export default { fil_adres: state => { return state....
Bear's user avatar
  • 151
15 votes
3 answers
17k views

How to use vuex namespaced getters with arguments?

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) ...
Canor's user avatar
  • 919
1 vote
1 answer
6k views

Vuex Store Unknown Getters with Nuxt

I've almoust finished my app in Vuejs and now I decided to "rewrite" everything on Nuxt due to SSR :) I almoust get everything but there is this getter thing I am not getting.. I can't make it around ...
Marketingexpert's user avatar