fix: update InputFile component to use dynamic field name for setting uploaded file
This commit is contained in:
parent
9a0c6c1f0b
commit
aae10cf3bc
@ -54,7 +54,7 @@ export const InputFile = <TFormValues extends Record<string, unknown>>(
|
||||
|
||||
useEffect(() => {
|
||||
if (uploadedFile) {
|
||||
setValue('featured_image', uploadedFile)
|
||||
setValue(name as string, uploadedFile)
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [uploadedFile])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user