Answer the question
In order to leave comments, you need to log in
How to add reactive field to vuex store?
there is a filter storage in the form of an object with objects, in the mutation you need to set the filter to a value, but the 'value' property, in which the value is planned to be stored, has not been declared.
now, after receiving data via axios, I make the property reactive according to the manual, with the creation of a separate mutation
setFilters(state, filters){
Object.keys(filters).forEach((index) => {
let value = {
min: filters[index].min,
max: filters[index].max,
};
filters[index] = Object.assign({}, filters[index], { 'value': value });
});
state.filters = filters;
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question