You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/03-Customization/15-afcl.md
+37Lines changed: 37 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1237,6 +1237,43 @@ If you want to make table header or pagination, you can add `makeHeaderSticky`,
1237
1237
></Table>
1238
1238
```
1239
1239
1240
+
### Don't block pagination on loading
1241
+
1242
+
Sometimes you might want to allow user switch between pages, even if old request wasn't finished. For these porpuses you can use `blockPaginationOnLoading` and `abortSignal` in data callback:
1243
+
```ts
1244
+
<Table
1245
+
:columns="[
1246
+
{ label: 'Name', fieldName: 'name' },
1247
+
{ label: 'Age', fieldName: 'age' },
1248
+
{ label: 'Country', fieldName: 'country' },
1249
+
]"
1250
+
:data="loadPageData"
1251
+
//diff-add
1252
+
:blockPaginationOnLoading="false"
1253
+
:pageSize="3">
1254
+
</Table>
1255
+
1256
+
1257
+
...
1258
+
1259
+
asyncfunction loadPageData(data, abortSignal) {
1260
+
const { offset, limit } =data;
1261
+
// in real app do await callAdminForthApi or await fetch to get date, use offset and limit value to slice data
0 commit comments