mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
(quality) use point instant of square brackets in react-form-hook field path
This commit is contained in:
parent
37b17595a1
commit
1f5808da4a
@ -60,11 +60,11 @@ export const FormImageUpload = <TFieldValues extends FieldValues, TContext exten
|
||||
attachment_name: f.name
|
||||
});
|
||||
setValue(
|
||||
`${id}[attachment_name]` as Path<TFieldValues>,
|
||||
`${id}.attachment_name` as Path<TFieldValues>,
|
||||
f.name as UnpackNestedValue<FieldPathValue<TFieldValues, Path<TFieldValues>>>
|
||||
);
|
||||
setValue(
|
||||
`${id}[_destroy]` as Path<TFieldValues>,
|
||||
`${id}._destroy` as Path<TFieldValues>,
|
||||
false as UnpackNestedValue<FieldPathValue<TFieldValues, Path<TFieldValues>>>
|
||||
);
|
||||
if (typeof onFileChange === 'function') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user