File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
frontend/packages/pydantic-forms/src Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,11 @@ export const componentsMatcher = (
6666 return components ;
6767} ;
6868
69+ const defaultComponent : ElementMatch = {
70+ Element : TextField ,
71+ isControlledElement : true ,
72+ } ;
73+
6974export const fieldToComponentMatcher = (
7075 pydanticFormField : PydanticFormField ,
7176 customComponentMatcher : PydanticFormsContextConfig [ 'componentMatcher' ] ,
@@ -75,12 +80,8 @@ export const fieldToComponentMatcher = (
7580
7681 const ElementMatch : ElementMatch = matchedComponent
7782 ? matchedComponent . ElementMatch
78- : {
79- Element : TextField ,
80- isControlledElement : true ,
81- } ;
83+ : defaultComponent ; // Defaults to textField when there are no matches
8284
83- // Defaults to textField when there are no matches
8485 return {
8586 Element : ElementMatch ,
8687 pydanticFormField : pydanticFormField ,
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ const getPydanticFormField = (
8585 attributes : getFieldAttributes ( propertySchema ) ,
8686 schema : propertySchema ,
8787 validations : getFieldValidation ( propertySchema ) ,
88- columns : 6 , // TODO: Is this still relevant?
88+ columns : 6 , // TODO: Is this still relevant? https://github.com/workfloworchestrator/orchestrator-ui-library/issues/1891
8989 properties : parseProperties (
9090 propertySchema . properties || { } ,
9191 propertySchema . required || [ ] ,
You can’t perform that action at this time.
0 commit comments