diff options
author | 2021-02-08 19:50:25 +0200 | |
---|---|---|
committer | 2021-02-08 19:50:25 +0200 | |
commit | 20a1d2dfb810cdbed70514d3917e95ef620cfc78 (patch) | |
tree | d5d773fac184b3be76957d5c5f04728c1de1eb16 /src | |
parent | Create refMap to avoid errors on direct ref access (diff) |
Remove trailing whitespaces
Diffstat (limited to 'src')
-rw-r--r-- | src/components/Question.tsx | 6 | ||||
-rw-r--r-- | src/pages/FormPage.tsx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/components/Question.tsx b/src/components/Question.tsx index e619a45..9a15a07 100644 --- a/src/components/Question.tsx +++ b/src/components/Question.tsx @@ -99,7 +99,7 @@ class RenderedQuestion extends React.Component<QuestionProp> { case "text": this.setPublicState("valid", true); break; - + case "checkbox": // We need to check this here, because checkbox doesn't have onBlur if (this.props.question.required && typeof options !== "string") { @@ -135,13 +135,13 @@ class RenderedQuestion extends React.Component<QuestionProp> { let invalid = false; const options: string | string[] = this.props.question.data["options"]; switch (this.props.question.type) { - case QuestionType.TextArea: + case QuestionType.TextArea: case QuestionType.ShortText: if (this.props.public_state.get("value") === "") { invalid = true; } break; - + case QuestionType.Select: case QuestionType.Range: case QuestionType.Radio: diff --git a/src/pages/FormPage.tsx b/src/pages/FormPage.tsx index 7798be6..f0fb548 100644 --- a/src/pages/FormPage.tsx +++ b/src/pages/FormPage.tsx @@ -197,7 +197,7 @@ function FormPage(): JSX.Element { if (!form) { return <Loading/>; } - + const refMap: Map<string, React.RefObject<RenderedQuestion>> = new Map(); const questions = form.questions.map((question, index) => { const questionRef = createRef<RenderedQuestion>(); |