Skip to content

Commit

Permalink
fix(CommentForm): pass value to hidden inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
awinogradov committed Jun 29, 2023
1 parent b7fe540 commit efb49c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/CommentForm/CommentForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ export const CommentForm: React.FC<CommentFormProps> = ({
<StyledCommentForm ref={ref} tabIndex={0}>
<Form onSubmit={handleSubmit(onCommentSubmit)}>
{nullable(id, () => (
<input type="hidden" {...register('id')} />
<input type="hidden" value={id} {...register('id')} />
))}

{nullable(goalId, () => (
<input type="hidden" {...register('goalId')} />
<input type="hidden" value={goalId} {...register('goalId')} />
))}

{nullable(stateId, () => (
<input type="hidden" {...register('stateId')} />
<input type="hidden" value={stateId} {...register('stateId')} />
))}

<Controller
Expand Down

0 comments on commit efb49c7

Please sign in to comment.