Fixes bug where navigating from one survey question form directly to another wasn't reloading the form.

This commit is contained in:
mabashian
2020-12-08 14:54:02 -05:00
parent f44faf4e61
commit 4d448510b4

View File

@@ -30,7 +30,7 @@ function AnswerTypeField({ i18n }) {
return ( return (
<FormGroup <FormGroup
label={i18n._(t`Answer Type`)} label={i18n._(t`Answer type`)}
labelIcon={ labelIcon={
<Popover <Popover
content={i18n._( content={i18n._(
@@ -91,6 +91,7 @@ function SurveyQuestionForm({
return ( return (
<Formik <Formik
enableReinitialize
initialValues={{ initialValues={{
question_name: question?.question_name || '', question_name: question?.question_name || '',
question_description: question?.question_description || '', question_description: question?.question_description || '',
@@ -126,7 +127,7 @@ function SurveyQuestionForm({
id="question-variable" id="question-variable"
name="variable" name="variable"
type="text" type="text"
label={i18n._(t`Answer Variable Name`)} label={i18n._(t`Answer variable name`)}
validate={combine([noWhiteSpace(i18n), required(null, i18n)])} validate={combine([noWhiteSpace(i18n), required(null, i18n)])}
isRequired isRequired
tooltip={i18n._( tooltip={i18n._(