We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6b7239 commit eef8579Copy full SHA for eef8579
frontend/packages/pydantic-forms/src/core/hooks/usePydanticFormParser.tsx
@@ -75,7 +75,8 @@ const getPydanticFormField = (
75
)
76
: '';
77
78
- const constValue = flatSchema.const || undefined;
+ const addConstValue =
79
+ typeof flatSchema.const === 'undefined' ? false : true;
80
81
const arrayItem = flatSchema.items
82
? getPydanticFormField(
@@ -108,7 +109,7 @@ const getPydanticFormField = (
108
109
required,
110
validations,
111
columns: 6, // TODO: Is this still relevant? https://github.com/workfloworchestrator/orchestrator-ui-library/issues/1891
- ...(constValue && { const: constValue }),
112
+ ...(addConstValue && { const: flatSchema.const }),
113
properties,
114
...fieldDetailProvider?.[propertyId],
115
};
0 commit comments