Skip to content

Commit 96c5fc7

Browse files
committed
fix: update startBulkAction parameters for better type safety and improve getListInner return structure
1 parent e313d7f commit 96c5fc7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

adminforth/spa/src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,8 @@ export async function getList(resource: AdminForthResourceCommon, isPageLoaded:
563563

564564

565565

566-
export async function startBulkAction(actionId: string, resource: AdminForthResourceCommon, checkboxes: { value: string[] },
567-
bulkActionLoadingStates: {value: Record<string, boolean>}, getListInner: Function) {
566+
export async function startBulkAction(actionId: string, resource: AdminForthResourceCommon, checkboxes: { value: any[] },
567+
bulkActionLoadingStates: {value: Record<string, boolean>}, getListInner: () => Promise<any>) {
568568
const action = resource?.options?.bulkActions?.find(a => a.id === actionId);
569569
const { confirm, alert } = useAdminforth();
570570

adminforth/spa/src/views/ListView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ async function getListInner() {
323323
}
324324
rows.value = result.rows;
325325
totalRows.value = result.totalRows ?? 0;
326-
return { error: result.error };
326+
return result.error ? { error: result.error } : {};
327327
}
328328
329329
class SortQuerySerializer {

0 commit comments

Comments
 (0)