Skip to content

Commit c4ff0cb

Browse files
committed
pagination fix
1 parent 123ee99 commit c4ff0cb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

resources/js/composables/usePaginatedData.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,19 @@ export function usePaginatedData(
125125

126126
pagination.value.rows = event.rows;
127127

128-
fetchData().then(() => {
129-
scrollToTop();
128+
fetchData({
129+
onFinish: () => {
130+
scrollToTop();
131+
},
130132
});
131133
}
132134

133135
function filter(): void {
134136
pagination.value.page = 1;
135-
fetchData().then(() => {
136-
scrollToTop();
137+
fetchData({
138+
onFinish: () => {
139+
scrollToTop();
140+
},
137141
});
138142
}
139143

0 commit comments

Comments
 (0)