# Solution for showing edit value

**URL:** https://forum.codewithmosh.com/t/solution-for-showing-edit-value/24005
**Category:** Next.js
**Created:** [December 5, 2023, 11:56pm UTC](https://forum.codewithmosh.com/t/solution-for-showing-edit-value/24005 "2023-12-05T23:56:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![onlyhasbi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/onlyhasbi/32/4608_2.png) [@onlyhasbi](https://forum.codewithmosh.com/u/onlyhasbi)
#### Post date: [December 5, 2023, 11:56pm UTC](https://forum.codewithmosh.com/t/solution-for-showing-edit-value/24005/1 "2023-12-05T23:56:58Z")

</div>

if the data not show when clicking edit button after set default value component, you can also use default value from react-hook-form

here is the example

```auto
const {
    register,
    handleSubmit,
    control,
    formState: { errors },
  } = useForm<IssueFormData>({
    resolver: zodResolver(issueSchema),
    defaultValues: {
      title: issue?.title || '',
      description: issue?.description || '',
    },
  });

```
