@@ -33,10 +33,10 @@ import {
33
33
import cloneDeep from ' lodash/cloneDeep' ;
34
34
import isEmpty from ' lodash/isEmpty' ;
35
35
import isObject from ' lodash/isObject' ;
36
- import { defineComponent , provide } from ' vue' ;
36
+ import { defineComponent , inject , provide } from ' vue' ;
37
37
import { useNested , useVuetifyControl } from ' ../util' ;
38
38
import { AdditionalProperties } from ' ./components' ;
39
- import { UseDefaultValueKey } from ' @/util/inject' ;
39
+ import { IsDynamicPropertyContext } from ' @/util/inject' ;
40
40
41
41
const controlRenderer = defineComponent ({
42
42
name: ' object-renderer' ,
@@ -52,14 +52,17 @@ const controlRenderer = defineComponent({
52
52
53
53
const nested = useNested (' object' );
54
54
55
+ const isDynamic = inject <boolean >(IsDynamicPropertyContext , false );
56
+
55
57
// do not use the default value but the undefind so that
56
58
// the property is cleared when property clear action is executed
57
- provide (UseDefaultValueKey , false );
59
+ provide (IsDynamicPropertyContext , false );
58
60
59
61
return {
60
62
... control ,
61
63
input: control ,
62
64
nested ,
65
+ isDynamic ,
63
66
};
64
67
},
65
68
computed: {
@@ -78,7 +81,7 @@ const controlRenderer = defineComponent({
78
81
detailUiSchema(): UISchemaElement {
79
82
const uiSchemaGenerator = () => {
80
83
const uiSchema = Generate .uiSchema (this .control .schema , ' Group' );
81
- if (isEmpty (this .control .path )) {
84
+ if (isEmpty (this .control .path ) || this . isDynamic ) {
82
85
uiSchema .type = ' VerticalLayout' ;
83
86
} else {
84
87
(uiSchema as GroupLayout ).label = this .control .label ;
0 commit comments