vuex-crud icon indicating copy to clipboard operation
vuex-crud copied to clipboard

entities & list aren't updated after re-run fetchList

Open sedevops opened this issue 6 years ago • 0 comments

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?

sedevops avatar Nov 26 '18 06:11 sedevops