Skip to content

Commit

Permalink
fix: name mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-belcher committed Nov 16, 2023
1 parent 6bfc09d commit f767a24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/services/ui/src/components/RHF/FieldArray.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export const RHFFieldArray = <TFields extends FieldValues>(
return (
<div className="flex flex-row gap-3" key={FLD.id}>
{props.fields.map((SLOT) => {
const adjustedPrefix =
(props.groupNamePrefix ?? "") + `${props.name}.${index}.`;
const adjustedSlotName = adjustedPrefix + SLOT.name;
const prefix = `${props.name}.${index}.`;
const adjustedPrefix = (props.groupNamePrefix ?? "") + prefix;
const adjustedSlotName = prefix + SLOT.name;
return (
<FormField
key={adjustedSlotName}
Expand Down
6 changes: 3 additions & 3 deletions src/services/ui/src/components/RHF/FieldGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export const FieldGroup = <TFields extends FieldValues>(
return (
<div className="flex flex-col gap-3" key={FLD.id}>
{props.fields.map((SLOT) => {
const adjustedPrefix =
(props.groupNamePrefix ?? "") + `${props.name}.${index}.`;
const adjustedSlotName = adjustedPrefix + SLOT.name;
const prefix = `${props.name}.${index}.`;
const adjustedPrefix = (props.groupNamePrefix ?? "") + prefix;
const adjustedSlotName = prefix + SLOT.name;
return (
<FormField
key={adjustedSlotName}
Expand Down

0 comments on commit f767a24

Please sign in to comment.