Fix(Form): Fix ref error

This commit is contained in:
2024-06-13 15:17:18 +08:00
parent 637fd236c5
commit 1b89cb6bbd
7 changed files with 34 additions and 25 deletions

View File

@@ -29,10 +29,10 @@ const Mail = () => {
<>
<AntdForm
form={mailSendForm}
ref={(ref) => {
ref={() => {
setTimeout(() => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
ref?.getFieldInstance('to').focus()
mailSendForm?.getFieldInstance('to').focus()
}, 50)
}}
>