From b5f018da459f117008c6180d9a6a33f9db8146b2 Mon Sep 17 00:00:00 2001 From: Oskari Ponkala Date: Mon, 21 Jun 2021 16:48:14 +0000 Subject: [PATCH] signup options separator: comma->semicolon --- .../SignupQuestionsWidget/OptionsWidget.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/Widgets/SignupQuestionsWidget/OptionsWidget.tsx b/src/components/Widgets/SignupQuestionsWidget/OptionsWidget.tsx index d8fa923..73c9714 100644 --- a/src/components/Widgets/SignupQuestionsWidget/OptionsWidget.tsx +++ b/src/components/Widgets/SignupQuestionsWidget/OptionsWidget.tsx @@ -13,7 +13,7 @@ class OptionsWidget extends React.Component { handleListOptionsChange = (questions: Question[], index: number): React.ChangeEventHandler => (event) => { const { onChange } = this.props; const val = event.target.value; - const lst = val.split(",").map((p) => p.trimLeft()); + const lst = val.split(";").map((p) => p.trimLeft()); // eslint-disable-next-line no-param-reassign questions[index].options = lst; onChange(questions); @@ -31,7 +31,7 @@ class OptionsWidget extends React.Component { const { onChange } = this.props; const val = event.target.value; if (val !== "") { - const lst = val.split(",").map((p) => p.trimLeft()); + const lst = val.split(";").map((p) => p.trimLeft()); // Ignore everything else but the two first values // eslint-disable-next-line no-param-reassign questions[index].options = lst.splice(0, 2); @@ -93,12 +93,12 @@ class OptionsWidget extends React.Component { if (type === "integer") { const lst = value as string[]; - const joinedValue = lst.join(","); + const joinedValue = lst.join(";"); return ( <> @@ -109,12 +109,12 @@ class OptionsWidget extends React.Component { if (type === "radiobutton") { const lst = value as string[]; - const joinedValue = lst.join(","); + const joinedValue = lst.join(";"); return ( <> @@ -125,12 +125,12 @@ class OptionsWidget extends React.Component { if (type === "checkbox") { const lst = value as string[]; - const joinedValue = lst.join(","); + const joinedValue = lst.join(";"); return ( <>