Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed May 20, 2023
1 parent 1deedf2 commit b3df005
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/form/src/components/SchemaForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,13 @@ function BetaSchemaForm<T, ValueType = 'text'>(
<FormRenderComponents
{...specificProps}
{...restProps}
onInit={(_, form) => {
onInit={(_, initForm) => {
if (propsFormRef) {
(propsFormRef as React.MutableRefObject<ProFormInstance<T>>).current =
form;
initForm;
}
restProps?.onInit?.(_, form);
formRef.current = form;
restProps?.onInit?.(_, initForm);
formRef.current = initForm;
}}
form={props.form || form}
formRef={formRef}
Expand Down
3 changes: 2 additions & 1 deletion tests/form/modalForm.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ModalForm, ProFormText } from '@ant-design/pro-form';
import { act, fireEvent, render, waitFor } from '@testing-library/react';
import { Button, FormInstance } from 'antd';
import type { FormInstance } from 'antd';
import { Button } from 'antd';
import React, { createRef } from 'react';
import { waitTime } from '../util';

Expand Down

0 comments on commit b3df005

Please sign in to comment.