File tree 7 files changed +23
-5
lines changed
packages/vue-vuetify/src/complex
7 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 16
16
:schema =" control.schema"
17
17
combinatorKeyword =" allOf"
18
18
:path =" path"
19
+ :rootSchema =" control.rootSchema"
19
20
/>
20
21
<dispatch-renderer
21
22
v-for =" (allOfRenderInfo, allOfIndex) in allOfRenderInfos"
Original file line number Diff line number Diff line change 4
4
:schema =" control.schema"
5
5
combinatorKeyword =" anyOf"
6
6
:path =" path"
7
+ :rootSchema =" control.rootSchema"
7
8
/>
8
9
9
10
<v-tabs v-model =" selectedIndex" >
Original file line number Diff line number Diff line change 20
20
import {
21
21
Generate ,
22
22
findUISchema ,
23
- isObjectControl ,
24
- rankWith ,
25
23
type ControlElement ,
26
24
type GroupLayout ,
27
- type JsonFormsRendererRegistryEntry ,
28
25
type UISchemaElement ,
29
26
} from ' @jsonforms/core' ;
30
27
import {
@@ -76,7 +73,12 @@ const controlRenderer = defineComponent({
76
73
},
77
74
detailUiSchema(): UISchemaElement {
78
75
const uiSchemaGenerator = () => {
79
- const uiSchema = Generate .uiSchema (this .control .schema , ' Group' );
76
+ const uiSchema = Generate .uiSchema (
77
+ this .control .schema ,
78
+ ' Group' ,
79
+ undefined ,
80
+ this .control .rootSchema ,
81
+ );
80
82
if (isEmpty (this .control .path )) {
81
83
uiSchema .type = ' VerticalLayout' ;
82
84
} else {
Original file line number Diff line number Diff line change 4
4
:schema =" control.schema"
5
5
combinatorKeyword =" oneOf"
6
6
:path =" path"
7
+ :rootSchema =" control.rootSchema"
7
8
/>
8
9
9
10
<v-select
Original file line number Diff line number Diff line change 4
4
:schema =" control.schema"
5
5
combinatorKeyword =" oneOf"
6
6
:path =" path"
7
+ :rootSchema =" control.rootSchema"
7
8
/>
8
9
9
10
<v-tabs
Original file line number Diff line number Diff line change @@ -227,7 +227,12 @@ export default defineComponent({
227
227
228
228
if (propSchema ) {
229
229
if (propSchema .type === ' object' || propSchema .type === ' array' ) {
230
- propUiSchema = Generate .uiSchema (propSchema , ' Group' );
230
+ propUiSchema = Generate .uiSchema (
231
+ propSchema ,
232
+ ' Group' ,
233
+ undefined ,
234
+ control .value .rootSchema ,
235
+ );
231
236
(propUiSchema as GroupLayout ).label =
232
237
propSchema .title ?? startCase (propName );
233
238
} else {
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ interface CombinatorProps {
23
23
schema: JsonSchema ;
24
24
combinatorKeyword: ' oneOf' | ' anyOf' | ' allOf' ;
25
25
path: string ;
26
+ rootSchema: JsonSchema ;
26
27
}
27
28
28
29
export default defineComponent ({
@@ -43,6 +44,10 @@ export default defineComponent({
43
44
type: String ,
44
45
required: true ,
45
46
},
47
+ rootSchema: {
48
+ type: Object as PropType <JsonSchema >,
49
+ required: true ,
50
+ },
46
51
},
47
52
setup(props : CombinatorProps ) {
48
53
const otherProps: JsonSchema = omit (
@@ -52,6 +57,8 @@ export default defineComponent({
52
57
const foundUISchema: UISchemaElement = Generate .uiSchema (
53
58
otherProps ,
54
59
' VerticalLayout' ,
60
+ undefined ,
61
+ props .rootSchema ,
55
62
);
56
63
57
64
const isLayout = (uischema : UISchemaElement ): uischema is Layout =>
You can’t perform that action at this time.
0 commit comments