Skip to content

Commit

Permalink
fix: default question type not properly set
Browse files Browse the repository at this point in the history
closes #956
  • Loading branch information
elboletaire committed Feb 4, 2025
1 parent 1602238 commit b8267ec
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/components/ProcessCreate/StepForm/Questions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@ export interface QuestionsValues {
const QuestionsTabs = () => {
const { t } = useTranslation()
const { form, setForm } = useProcessCreationSteps()
const {
watch,
register,
setValue,
trigger,
formState: { errors },
} = useFormContext()
const { watch, register, setValue, trigger, getValues } = useFormContext()
const { replace } = useFieldArray({
name: `questions`,
})
Expand Down Expand Up @@ -75,6 +69,7 @@ export const Questions = () => {
const methods = useForm<QuestionsValues>({
defaultValues: {
questions: form.questions,
questionType: form.questionType,
},
})

Expand Down

2 comments on commit b8267ec

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.