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

@@ -264,10 +264,10 @@ const Tools = () => {
<>
<AntdForm
form={upgradeForm}
ref={(ref) => {
ref={() => {
setTimeout(() => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
ref?.getFieldInstance('toolId').focus()
upgradeForm?.getFieldInstance('toolId').focus()
}, 50)
}}
labelCol={{ span: 4 }}