Skip to content

Commit fe83180

Browse files
papadopanpamfilos
authored andcommitted
ui: add dynamic schema for advanced fields
1 parent 9c3a780 commit fe83180

File tree

2 files changed

+371
-17
lines changed

2 files changed

+371
-17
lines changed

ui/cap-react/src/components/cms/components/SchemaWizard/PropertyEditor/customizeField.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,15 @@ class CustomizeField extends React.Component {
132132
}
133133
if (uiSchema["ui:field"]) {
134134
type = uiSchema["ui:field"];
135+
if (
136+
uiSchema["ui:field"] === "idFetcher" &&
137+
uiSchema["ui:servicesList"].length < 3
138+
) {
139+
type = uiSchema["ui:servicesList"][0].value;
140+
}
141+
}
142+
if (uiSchema["ui:object"]) {
143+
type = uiSchema["ui:object"];
135144
}
136145

137146
// if there is no type then there is nothing to return
@@ -174,6 +183,15 @@ class CustomizeField extends React.Component {
174183
}
175184
if (uiSchema["ui:field"]) {
176185
type = uiSchema["ui:field"];
186+
if (
187+
uiSchema["ui:field"] === "idFetcher" &&
188+
uiSchema["ui:servicesList"].length < 3
189+
) {
190+
type = uiSchema["ui:servicesList"][0].value;
191+
}
192+
}
193+
if (uiSchema["ui:object"]) {
194+
type = uiSchema["ui:object"];
177195
}
178196

179197
// if there is no type then there is nothing to return

0 commit comments

Comments
 (0)