Skip to content

Commit 0d2eda6

Browse files
committed
#8153 Propagate windowId to StateProviders and Controllers
1 parent 732a8ab commit 0d2eda6

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/component/Abstract.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ class Abstract extends Base {
254254
const me = this;
255255

256256
if (value) {
257+
me.controller && (me.controller.windowId = value);
258+
me.stateProvider && (me.stateProvider.windowId = value);
259+
257260
Neo.currentWorker.insertThemeFiles(value, me.__proto__)
258261
}
259262

@@ -287,7 +290,7 @@ class Abstract extends Base {
287290

288291
if (value) {
289292
let me = this,
290-
defaultValues = {component: me};
293+
defaultValues = {component: me, windowId: me.windowId};
291294

292295
if (me.modelData) {
293296
defaultValues.data = me.modelData

src/controller/Component.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Component extends Base {
3333
*/
3434
references: null,
3535
/**
36-
* @member {Number|null} windowId=null
36+
* @member {String|null} windowId=null
3737
*/
3838
windowId: null
3939
}

src/state/Provider.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ class Provider extends Base {
111111
* }
112112
* @reactive
113113
*/
114-
stores_: null
114+
stores_: null,
115+
/**
116+
* @member {String|null} windowId=null
117+
*/
118+
windowId: null
115119
}
116120

117121
/**

0 commit comments

Comments
 (0)