I have issue updating the state after a dispatch.
Console logging the result of the dispatch shows Promise pending and value undefined hence, never gets to the store.
Below is the function that calls the dispatch handler.
unsetSelected() {
let some = this.$store.dispatch('user/selectedDevice', null)
console.log(some)
}
<span class="ellipsis" @click="setSelected(device)">
<i v-if="selectedDevice && selectedDevice.id == device.id"
@click="unsetSelected()"
class="fa fa-times-circle">
</i>
<i v-else="" class="fa fa-ellipsis-v"></i>
</span>
This is the action handler:
selectedDevice ({ commit }, data) {
commit ('SELECTED_DEVICE', data);
}