File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
frontend/packages/pydantic-forms/src Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ const getPydanticFormField = (
7676 formLabels ,
7777 )
7878 : '' ;
79+
80+ const constValue = flatSchema . const || undefined ;
81+
7982 const arrayItem = flatSchema . items
8083 ? getPydanticFormField (
8184 flatSchema . items ,
@@ -107,6 +110,7 @@ const getPydanticFormField = (
107110 required,
108111 validations,
109112 columns : 6 , // TODO: Is this still relevant? https://github.com/workfloworchestrator/orchestrator-ui-library/issues/1891
113+ ...( constValue && { const : constValue } ) ,
110114 properties,
111115 ...fieldDetailProvider ?. [ propertyId ] ,
112116 } ;
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ export interface PydanticFormField {
9696 default ?: PydanticFormFieldValue ;
9797 columns : number ;
9898 required : boolean ;
99+ const ?: PydanticFormFieldValue | null ;
99100 schema : PydanticFormPropertySchemaParsed ;
100101 validations : PydanticFormFieldValidations ;
101102 attributes : PydanticFormFieldAttributes ;
You can’t perform that action at this time.
0 commit comments