Skip to content

Commit

Permalink
Use getValues
Browse files Browse the repository at this point in the history
  • Loading branch information
andersrognstad committed Sep 30, 2024
1 parent a6dc4f6 commit 6e98f2c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default function IkkeAktuellSkjema() {
watch,
formState: { errors },
handleSubmit,
getValues,
} = useForm<SkjemaValues>();

const submit = (values: SkjemaValues) => {
Expand Down Expand Up @@ -104,7 +105,7 @@ export default function IkkeAktuellSkjema() {
contentLabel={texts.buttons.previewContentLabel}
getDocumentComponents={() =>
getIkkeAktuellDocument({
begrunnelse: watch("begrunnelse"),
begrunnelse: getValues("begrunnelse"),
})
}
/>
Expand Down

0 comments on commit 6e98f2c

Please sign in to comment.