修复小问题
parent
6a28a0fa58
commit
155b817346
|
@ -62,8 +62,14 @@ export function useTable(tableProps?: Props): [
|
||||||
return table as TableActionType;
|
return table as TableActionType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getTableRef(){
|
||||||
|
return tableRef;
|
||||||
|
}
|
||||||
|
|
||||||
const methods: TableActionType & {
|
const methods: TableActionType & {
|
||||||
getForm: () => FormActionType;
|
getForm: () => FormActionType;
|
||||||
|
} & {
|
||||||
|
getTableRef: () => any;
|
||||||
} = {
|
} = {
|
||||||
reload: async (opt?: FetchParams) => {
|
reload: async (opt?: FetchParams) => {
|
||||||
return await getTableInstance().reload(opt);
|
return await getTableInstance().reload(opt);
|
||||||
|
@ -153,6 +159,9 @@ export function useTable(tableProps?: Props): [
|
||||||
collapseAll: () => {
|
collapseAll: () => {
|
||||||
getTableInstance().collapseAll();
|
getTableInstance().collapseAll();
|
||||||
},
|
},
|
||||||
|
getTableRef: () => {
|
||||||
|
return getTableRef();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return [register, methods];
|
return [register, methods];
|
||||||
|
|
Loading…
Reference in New Issue