All Questions
18 questions
0
votes
1
answer
56
views
vue v-for does not update when vuex getter returns a new array
I am trying to create a reactive array that is displayed to the screen using a v-for. The array is stored in a vuex state array and is retrieved by the vue component using a vuex getter. Inside a ...
1
vote
0
answers
67
views
Can't delete an item from an array with Vue and Vuex
I am working on a website with Vue and Vuex and I've got a selected state which contains
the selected sensors plus the selected device ids and looks like this:
{
"device-id": [
{...
1
vote
0
answers
166
views
put objects of mapState in an array (vue2/js/vuex)
I'm trying to put in an array('allData') 2 array of objects from 'roomContent' and 'roomSurveys. And when i check with vue inspector my allData is well created but not filled with the elements I want.....
2
votes
1
answer
1k
views
How to update a state array in Vuex?
I need to be able to ADD, REMOVE AND EDIT entries. So far I've only been able to add and remove.
My question is: to add, use PUSH, to remove, use SPLICE. But what about editing?
I am working with ...
0
votes
1
answer
47
views
How to use Data through components [closed]
I do have two components,
the first one is the component that i use to show a list of items,
the second component is about the styling and how the items should be displayed.
The items are stored in an ...
1
vote
0
answers
219
views
Remove the current product in vue and vuex and js?
Hell0 I want to remove the current which cursor had pointed product from the carts but actually, splice method does remove on the top product from carts ..here I need help to remove the current ...
0
votes
1
answer
35
views
Generating and mutating state in vuex
I am using the Array() constructor to create an empty array of size 3 then filling it using forEach() or Array.fill() but when I try to change/mutate any element inside the array the value of any ...
0
votes
0
answers
56
views
Generating arrays in vuex
I started learning vuex a week ago and I tried to generate something that look like that:
[
{ isClicked: false, toPlayer: null, cellID: 1 },
{ isClicked: false, toPlayer: null, cellID: 2 },
{ ...
1
vote
1
answer
185
views
Selecting specific object inside array of objects throwing undefined in Vuejs /Java app
In this app im building i have a little problem referring to adress the SPA to the selected item by its id.
Fetching my data to my end point(action) i got a array of objects , then through a getter i ...
0
votes
1
answer
742
views
DOM is not updating with updated content in Vue
I am a creating an application in Vue. I am getting an issue on showing the updating content, coming through the event bus. I also tried to use vuex for local content but it is still showing same ...
0
votes
2
answers
55
views
How comes Vue's shared state does not get updated without parseInt?
I've noticed a minor issue in my code which I don't understand and I'm quite curious to find out why it's behaving like it is. I'm guessing its a general JavaScript thing rather than Vue.
Anyway, I ...
0
votes
1
answer
878
views
Vuex state array keys
I initialize the state
state = {
matches: []
}
mutations = {
setMatches(state,payload) {
state.matches = payload
}
}
in my getters I setup to get keys
userMatchesId: state => {
...
0
votes
1
answer
3k
views
Vuex update array as value of object
I'm running into a problem updating data in the Vuex store within a slightly nested data structure.
My full project is a bit more complex than what is below, but the issue I'm running into now is ...
3
votes
2
answers
9k
views
Vue watch array (or object) push same old and new values
I'm using Vuex and I've created a module called claims that looks like this:
import to from 'await-to-js'
import { functions } from '@/main'
import Vue from 'vue'
const GENERATE_TX_SUCCESS = '...
1
vote
0
answers
72
views
Vuex Chartist display data
I have a problem with display data
this is my App.vue file:
mounted() {
this.$store.dispatch('getLocation'),
this.$store.dispatch('renderChart', this.$el);
},
my store.js looks like that
...