diff --git a/framework/core/js/src/admin/AdminApplication.tsx b/framework/core/js/src/admin/AdminApplication.tsx index 12357f9c75..7cdd30550c 100644 --- a/framework/core/js/src/admin/AdminApplication.tsx +++ b/framework/core/js/src/admin/AdminApplication.tsx @@ -147,11 +147,11 @@ export default class AdminApplication extends Application { super.mount('', '#'); - m.mount(document.getElementById('app-navigation')!, () => ); - m.mount(document.getElementById('header-navigation')!, () => ); - m.mount(document.getElementById('header-primary')!, () => ); - m.mount(document.getElementById('header-secondary')!, () => ); - m.mount(document.getElementById('admin-navigation')!, () => ); + this.redraw.navigation = m.mount(document.getElementById('app-navigation')!, () => ); + this.redraw.headerNavigation = m.mount(document.getElementById('header-navigation')!, () => ); + this.redraw.headerPrimary = m.mount(document.getElementById('header-primary')!, () => ); + this.redraw.headerSecondary = m.mount(document.getElementById('header-secondary')!, () => ); + this.redraw.adminNav = m.mount(document.getElementById('admin-navigation')!, () => ); } getRequiredPermissions(permission: string) { diff --git a/framework/core/js/src/common/utils/patchMithril.js b/framework/core/js/src/common/utils/patchMithril.js index e8f51a0233..84ebb02352 100644 --- a/framework/core/js/src/common/utils/patchMithril.js +++ b/framework/core/js/src/common/utils/patchMithril.js @@ -170,6 +170,11 @@ export default function patchMithril(global) { return app.routing.current; } + modifiedMithril.route.set = function(link) { + console.warn('m.route.set is not available in v3, falling back to managed routing'); + app.routing.set(link); + } + modifiedMithril.redraw = function () { console.warn('global redraw is not available in v3, using managed global redraw for now'); app.redrawAll();