diff --git a/src/api/types.ts b/src/api/types.ts index d5844f89c..d23b6a1fd 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -112,7 +112,7 @@ export interface OHRIFormField { required?: boolean; unspecified?: boolean; disabled?: boolean; - readonly?: string | boolean; + readonly?: boolean; inlineRendering?: 'single-line' | 'multiline' | 'automatic'; validators?: Array>; behaviours?: Array>; diff --git a/src/components/inputs/content-switcher/ohri-content-switcher.component.tsx b/src/components/inputs/content-switcher/ohri-content-switcher.component.tsx index bd4e9d3ea..1b36d5388 100644 --- a/src/components/inputs/content-switcher/ohri-content-switcher.component.tsx +++ b/src/components/inputs/content-switcher/ohri-content-switcher.component.tsx @@ -68,7 +68,11 @@ export const OHRIContentSwitcher: React.FC = ({ question, on ) : ( !question.isHidden && ( - + {question.questionOptions.answers.map((option, index) => ( = ({ question, onChange, handler, className={`${styles.controlWidthConstrained} ${isFieldRequiredError ? styles.errorLabel : styles.boldedLabel}`} warn={warnings.length > 0} warnText={warnings[0]?.message} - step="0.01" + step={0.01} /> ); diff --git a/src/utils/ohri-form-helper.ts b/src/utils/ohri-form-helper.ts index 70136b161..d262badb2 100644 --- a/src/utils/ohri-form-helper.ts +++ b/src/utils/ohri-form-helper.ts @@ -68,9 +68,9 @@ export function isInlineView( export function evaluateFieldReadonlyProp( field: OHRIFormField, - sectionReadonly: string | boolean, - pageReadonly: string | boolean, - formReadonly: string | boolean, + sectionReadonly: boolean, + pageReadonly: boolean, + formReadonly: boolean, ) { if (!isEmpty(field.readonly)) { return;