I have a button inside my vue component
<button class="search-participant__btn" @click="getParticipant({iin, index, switchIsLoading})">Найти</button>
getParticipant, is a function inside actions vuex, that i imported to this component
export const getParticipant = ({commit, getters}, {iin, index, callback}) => {
callback(true);
axios.post('/getParticipant', {iin}).then(response => {
if(response.data.success) {
}
})
}
but when i wanted to call function that i pass into getParticipant, it doesn't work, i just need to change local state data named isLoading to true, when i click the button. And then switch it into false, when response is come back
How to make it correctly?