Skip to content

Commit 253abb7

Browse files
committed
MOBILE-3340 siteplugins: Update preSets when using samePage=true
1 parent 6d06a7e commit 253abb7

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/core/siteplugins/components/plugin-content/plugin-content.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,14 @@ export class CoreSitePluginsPluginContentComponent implements OnInit, DoCheck {
170170
* @param component New component. If not provided, current component
171171
* @param method New method. If not provided, current method
172172
* @param jsData JS variables to pass to the new view so they can be used in the template or JS.
173+
* @param preSets New preSets to use. If not provided, use current preSets.
173174
*/
174-
updateContent(args: any, component?: string, method?: string, jsData?: any): void {
175+
updateContent(args: any, component?: string, method?: string, jsData?: any, preSets?: any): void {
175176
this.component = component || this.component;
176177
this.method = method || this.method;
177178
this.args = args;
178179
this.dataLoaded = false;
180+
this.preSets = preSets || this.preSets;
179181
if (jsData) {
180182
Object.assign(this.data, jsData);
181183
}

src/core/siteplugins/directives/call-ws-new-content.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export class CoreSitePluginsCallWSNewContentDirective extends CoreSitePluginsCal
8787
if (this.utils.isTrueOrOne(this.samePage)) {
8888
// Update the parent content (if it exists).
8989
if (this.parentContent) {
90-
this.parentContent.updateContent(args, this.component, this.method, this.jsData);
90+
this.parentContent.updateContent(args, this.component, this.method, this.jsData, this.newContentPreSets);
9191
}
9292
} else {
9393
let jsData = this.jsData;

src/core/siteplugins/directives/new-content.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export class CoreSitePluginsNewContentDirective implements OnInit {
8484
if (this.utils.isTrueOrOne(this.samePage)) {
8585
// Update the parent content (if it exists).
8686
if (this.parentContent) {
87-
this.parentContent.updateContent(args, this.component, this.method, this.jsData);
87+
this.parentContent.updateContent(args, this.component, this.method, this.jsData, this.preSets);
8888
}
8989
} else {
9090
let jsData = this.jsData;

0 commit comments

Comments
 (0)