I made a custom feature to refresh my data from the database by clicking a button:
<template>
<base-projects :projects="projects" />
</template>
<script>
import { mapGetters } from 'vuex';
import Projects from './Projects';
import projectService from '@/services/projectService';
export default {
components: { Projects },
computed: {
...mapGetters([
'projects'
])
},
created() {
projectService.getAllCompanyProjects();
},
};
</script>
Although it works well initially, it fails to reload the data on subsequent clicks. Any suggestions on how to resolve this inconsistency?
Your assistance is greatly appreciated!