diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index a2ccd5d92..ee6937add 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -2,6 +2,7 @@ import { onBeforeUnmount, onMounted, ref, watch } from 'vue'; import { useI18n } from 'vue-i18n'; import { useArrayData } from 'composables/useArrayData'; +import { onBeforeRouteUpdate } from 'vue-router'; const { t } = useI18n(); @@ -110,6 +111,13 @@ onMounted(async () => { mounted.value = true; }); +// onBeforeRouteUpdate((to, from, next) => { +// if (to.name === from.name && to.path !== from.path) { +// arrayData.reset(['data']); +// } +// next(); +// }); + onBeforeUnmount(() => { arrayData.resetPagination(); });