Skip to content

Commit

Permalink
perf: getFormRef 增加需要打开对话框的警告提示
Browse files Browse the repository at this point in the history
  • Loading branch information
greper committed Feb 13, 2023
1 parent 988d669 commit 671f440
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/fast-crud/src/use/use-expose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ export function useExpose(props: UseExposeProps): { expose: CrudExpose; crudExpo
},
getFormRef: () => {
const formWrapperRef = crudExpose.getFormWrapperRef();
if (formWrapperRef == null || formWrapperRef?.formRef == null) {
logger.error("编辑对话框还未打开,无法获取FormRef");
return;
}
return formWrapperRef?.formRef;
},
getFormData: () => {
Expand Down

0 comments on commit 671f440

Please sign in to comment.