Add context to ViewModel
This commit is contained in:
@@ -3476,6 +3476,7 @@ var VMPanel = /** @class */ (function (_super) {
|
||||
VMPanel.prototype.build = function (root) {
|
||||
this.vh = new (this.getViewHolderClass());
|
||||
this.vm = new (this.getViewModelClass())(this.getState(), this.vh);
|
||||
this.vm.context = this.context;
|
||||
this.vm.attach(root);
|
||||
};
|
||||
return VMPanel;
|
||||
|
@@ -2695,6 +2695,7 @@ class VMPanel extends Panel {
|
||||
build(root) {
|
||||
this.vh = new (this.getViewHolderClass());
|
||||
this.vm = new (this.getViewModelClass())(this.getState(), this.vh);
|
||||
this.vm.context = this.context;
|
||||
this.vm.attach(root);
|
||||
}
|
||||
}
|
||||
|
@@ -4184,6 +4184,7 @@ class VMPanel extends Panel {
|
||||
build(root) {
|
||||
this.vh = new (this.getViewHolderClass());
|
||||
this.vm = new (this.getViewModelClass())(this.getState(), this.vh);
|
||||
this.vm.context = this.context;
|
||||
this.vm.attach(root);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user