Feat: Upgrade react-hook-form to the latest version to solve the problem that appending a useFieldArray entry cannot trigger the watch callback function #3221 (#7849)

### What problem does this PR solve?

Feat: Upgrade react-hook-form to the latest version to solve the problem
that appending a useFieldArray entry cannot trigger the watch callback
function #3221

[issue: watch is not called when appending first item to Field Array
#12370](https://github.com/react-hook-form/react-hook-form/issues/12370)

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-05-26 12:21:19 +08:00
committed by GitHub
parent be83074131
commit 78fa37f8ae
5 changed files with 23 additions and 8 deletions

View File

@ -126,9 +126,17 @@ export function useFormConfigMap() {
},
[Operator.Message]: {
component: MessageForm,
defaultValues: {},
defaultValues: {
content: [],
},
schema: z.object({
content: z.array(z.string()).optional(),
content: z
.array(
z.object({
value: z.string(),
}),
)
.optional(),
}),
},
[Operator.Relevant]: {