diff --git a/src/components/inputs/multi-select/multi-select.component.tsx b/src/components/inputs/multi-select/multi-select.component.tsx index 571e94c52..791ff5c19 100644 --- a/src/components/inputs/multi-select/multi-select.component.tsx +++ b/src/components/inputs/multi-select/multi-select.component.tsx @@ -108,25 +108,7 @@ const MultiSelect: React.FC = ({ question, onChange, handler, pr <>
- {question.questionOptions.answers?.length > 5 ? ( - (item ? item.label : ' ')} - disabled={question.isDisabled} - invalid={errors.length > 0} - invalidText={errors[0]?.message} - warn={warnings.length > 0} - warnText={warnings[0]?.message} - readOnly={question.readonly} - /> - ) : ( + {question.inlineMultiCheckbox ? ( {question.questionOptions.answers?.map((value, index) => { return ( @@ -146,6 +128,24 @@ const MultiSelect: React.FC = ({ question, onChange, handler, pr ); })} + ) : ( + (item ? item.label : ' ')} + disabled={question.isDisabled} + invalid={errors.length > 0} + invalidText={errors[0]?.message} + warn={warnings.length > 0} + warnText={warnings[0]?.message} + readOnly={question.readonly} + /> )}
diff --git a/src/types.ts b/src/types.ts index 773ed79fc..0b82de565 100644 --- a/src/types.ts +++ b/src/types.ts @@ -134,6 +134,7 @@ export interface FormField { questionInfo?: string; historicalExpression?: string; constrainMaxWidth?: boolean; + inlineMultiCheckbox?: boolean; meta?: QuestionMetaProps; }