vuex-crud
vuex-crud copied to clipboard
entities & list aren't updated after re-run fetchList
For example, I have 2 lists that are specified by query string ?id=
So I create a custom action for getting with a custom url:
actions: {
fetchBuildsOfService({commit, dispatch}, id) {
const url = `/my-url?id=${id}`;
dispatch('fetchList', {
customUrl: url
})
}
}
When I visit url?id=1
the list has 2 items.
When I visit url?id=2
the list is empty, but the state is keeping 2 items => it didn't update new response.
Should we have a method for resetting the states? Is this following the best practice?