File tree Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,8 @@ export function defaultValue(field) {
1212 return clone ( field . default ) ;
1313 }
1414
15- const component =
16- window . panel . app . $options . components [ `k-${ field . type } -field` ] ;
17-
18- const valueProp = component ?. options . props ?. value ;
15+ const component = window . panel . app . component ( `k-${ field . type } -field` ) ;
16+ const valueProp = component ?. props ?. value ;
1917
2018 // if the field has no value prop,
2119 // it will be completely skipped
Original file line number Diff line number Diff line change @@ -9,18 +9,17 @@ describe.concurrent("$helper.field.form()", () => {
99 // mock the app with the component setup
1010 window . panel = {
1111 app : {
12- $options : {
13- components : {
12+ component ( name ) {
13+ const components = {
1414 "k-custom-field" : {
15- options : {
16- props : {
17- value : {
18- default : "test"
19- }
15+ props : {
16+ value : {
17+ default : "test"
2018 }
2119 }
2220 }
23- }
21+ } ;
22+ return components [ name ] ;
2423 }
2524 }
2625 } ;
You can’t perform that action at this time.
0 commit comments