File tree 1 file changed +6
-12
lines changed
packages/admin/src/components
1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ export default DitoComponent.component('DitoSchema', {
166
166
? data (this .context )
167
167
: data
168
168
),
169
- currentTab : null ,
169
+ selectedTab : null ,
170
170
componentsRegistry: {},
171
171
panesRegistry: {},
172
172
panelsRegistry: {},
@@ -195,16 +195,6 @@ export default DitoComponent.component('DitoSchema', {
195
195
return getNamedSchemas (this .schema .tabs )
196
196
},
197
197
198
- selectedTab: {
199
- get () {
200
- return this .currentTab || this .defaultTab || null
201
- },
202
-
203
- set (selectedTab ) {
204
- this .currentTab = selectedTab
205
- }
206
- },
207
-
208
198
defaultTab () {
209
199
let first = null
210
200
if (this .tabs ) {
@@ -376,7 +366,7 @@ export default DitoComponent.component('DitoSchema', {
376
366
// handled, but remove the trailing `/create` or `/:id` from it so that
377
367
// tabs informs that stay open after creation still work.
378
368
if (this .hasRootTabs ) {
379
- this .currentTab = hash? .slice (1 ) || null
369
+ this .selectedTab = hash? .slice (1 ) || null
380
370
}
381
371
}
382
372
},
@@ -412,6 +402,10 @@ export default DitoComponent.component('DitoSchema', {
412
402
}
413
403
},
414
404
405
+ mounted () {
406
+ this .selectedTab = this .defaultTab
407
+ },
408
+
415
409
unmounted () {
416
410
this .emitEvent (' destroy' )
417
411
this ._register (false )
You can’t perform that action at this time.
0 commit comments