Skip to content

Commit

Permalink
修复小问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangdaiscott committed Nov 7, 2022
1 parent 6a28a0f commit 155b817
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/Table/src/hooks/useTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,15 @@ export function useTable(tableProps?: Props): [
}
return table as TableActionType;
}

function getTableRef(){
return tableRef;
}

const methods: TableActionType & {
getForm: () => FormActionType;
} & {
getTableRef: () => any;
} = {
reload: async (opt?: FetchParams) => {
return await getTableInstance().reload(opt);
Expand Down Expand Up @@ -153,6 +159,9 @@ export function useTable(tableProps?: Props): [
collapseAll: () => {
getTableInstance().collapseAll();
},
getTableRef: () => {
return getTableRef();
}
};

return [register, methods];
Expand Down

0 comments on commit 155b817

Please sign in to comment.