diff --git a/packages/ui-concerto/src/components/fields.js b/packages/ui-concerto/src/components/fields.js
index 0b7541e..7ab772a 100644
--- a/packages/ui-concerto/src/components/fields.js
+++ b/packages/ui-concerto/src/components/fields.js
@@ -233,6 +233,7 @@ export const ConcertoDropdown = ({
id,
readOnly,
value,
+ text,
onFieldValueChange,
options,
}) => !readOnly ? (
@@ -245,7 +246,7 @@ export const ConcertoDropdown = ({
options={options}
/>
) : (
-
+
);
const BinaryField = ({ className, children }) => (
@@ -261,4 +262,4 @@ export const MonetaryAmount = ({ children }) => (
export const Duration = ({ children }) => (
{children}
-);
+);
\ No newline at end of file
diff --git a/packages/ui-concerto/src/modelBuilderVisitor.js b/packages/ui-concerto/src/modelBuilderVisitor.js
index 41631fe..3e8d18a 100644
--- a/packages/ui-concerto/src/modelBuilderVisitor.js
+++ b/packages/ui-concerto/src/modelBuilderVisitor.js
@@ -157,6 +157,8 @@ class ModelBuilderVisitor extends ReactFormVisitor {
}, key);
};
+ // For read only, we also need the alternative text for the Input component if it exists
+ const altText = declarationTypes.find(({ value: declValue }) => declValue === value.$class);
return (
{name.accept(this, parameters)}
@@ -166,6 +168,7 @@ class ModelBuilderVisitor extends ReactFormVisitor {
id={`${key}.$class`}
key={key}
value={value.$class}
+ text={altText ? altText.text : value.$class}
readOnly={parameters.disabled}
onFieldValueChange={onFieldValueChange}
options={declarationTypes.map(({ value, text }) => ({