refactor: 08 => reset page and data on search or status filter change in request list

This commit is contained in:
puriphatt 2025-02-03 13:22:59 +07:00
parent 1fc6b39e37
commit 2448f4b228

View file

@ -102,9 +102,11 @@ onMounted(async () => {
await fetchList({ rotateFlowId: true }); await fetchList({ rotateFlowId: true });
}); });
watch([() => pageState.inputSearch, () => pageState.statusFilter], () => watch([() => pageState.inputSearch, () => pageState.statusFilter], () => {
fetchList({ rotateFlowId: true }), page.value = 1;
); data.value = [];
fetchList({ rotateFlowId: true });
});
</script> </script>
<template> <template>
<div class="column full-height no-wrap"> <div class="column full-height no-wrap">