fix: use handleSubmit directly instead of form requestSubmit
Bypass potential React portal form resolution issues by calling react-hook-form handleSubmit(onFormSubmit)() directly in the button onClick handler.
This commit is contained in:
@@ -284,7 +284,7 @@ function AgentEditDialogBody({
|
|||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => formRef.current?.requestSubmit()}
|
onClick={() => handleSubmit(onFormSubmit)()}
|
||||||
disabled={saving || loading}
|
disabled={saving || loading}
|
||||||
>
|
>
|
||||||
{saving ? "保存中..." : "保存"}
|
{saving ? "保存中..." : "保存"}
|
||||||
|
|||||||
Reference in New Issue
Block a user