File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,7 +47,10 @@ export default class ModelManager {
4747 this . activeViewIndex = 0 ;
4848 this . collapseState = { } ;
4949 this . listeners = [ ] ;
50- this . nextViewId = 0 ;
50+
51+ if ( this . model . defaultActiveView ) {
52+ this . activateView ( this . model . defaultActiveView , 0 ) ;
53+ }
5154 }
5255
5356 get data ( ) {
@@ -117,6 +120,11 @@ export default class ModelManager {
117120 activateView ( name , index = 0 ) {
118121 this . activeViewName = name ;
119122 this . activeViewIndex = index ;
123+
124+ // getPropertyList() will generate our data model.
125+ // Afterwards, we run our hooks.
126+ this . getPropertyList ( ) ;
127+ this . runHooks ( ) ;
120128 }
121129
122130 // --------
@@ -140,7 +148,7 @@ export default class ModelManager {
140148 const index = viewList . length ;
141149 const name = `${ this . localizedData . getView ( viewName ) } ${ index } ` ;
142150
143- viewList . push ( { name, id : this . nextViewId ++ } ) ;
151+ viewList . push ( { name, id : this . getNextViewId ( ) } ) ;
144152 this . data = assignObjKey ( this . data , viewName , viewList ) ;
145153 this . activateView ( viewName , index ) ;
146154 // generate data model for new view (...using a get method with side-effects...)
You can’t perform that action at this time.
0 commit comments