diff --git a/src/@fuse/services/config.service.ts b/src/@fuse/services/config.service.ts index 554910e1..b06dde09 100644 --- a/src/@fuse/services/config.service.ts +++ b/src/@fuse/services/config.service.ts @@ -93,15 +93,18 @@ export class FuseConfigService // Set the config from the default config this._configSubject = new BehaviorSubject(_.cloneDeep(this._defaultConfig)); - // Reload the default config on every RoutesRecognized event if - // the current config is different from the default one + // Reload the default layout config on every RoutesRecognized event + // if the current layout config is different from the default one this._router.events .pipe(filter(event => event instanceof RoutesRecognized)) .subscribe(() => { - if ( !_.isEqual(this._configSubject.getValue(), this._defaultConfig) ) + if ( !_.isEqual(this._configSubject.getValue().layout, this._defaultConfig.layout) ) { - // Clone the default config - const config = _.cloneDeep(this._defaultConfig); + // Clone the current config + const config = _.cloneDeep(this._configSubject.getValue()); + + // Reset the layout from the default config + config.layout = _.cloneDeep(this._defaultConfig.layout); // Set the config this._configSubject.next(config); diff --git a/src/@fuse/types/fuse-config.ts b/src/@fuse/types/fuse-config.ts index d1b4c322..98b7af80 100644 --- a/src/@fuse/types/fuse-config.ts +++ b/src/@fuse/types/fuse-config.ts @@ -1,6 +1,7 @@ export interface FuseConfig { colorTheme: string; + customScrollbars: boolean; layout: { style: string, width: 'fullwidth' | 'boxed', @@ -29,5 +30,4 @@ export interface FuseConfig position: 'left' | 'right' } }; - customScrollbars: boolean; } diff --git a/src/app/fuse-config/index.ts b/src/app/fuse-config/index.ts index d061ccb8..f2b335f0 100644 --- a/src/app/fuse-config/index.ts +++ b/src/app/fuse-config/index.ts @@ -11,6 +11,7 @@ import { FuseConfig } from '@fuse/types'; export const fuseConfig: FuseConfig = { // Color themes can be defined in src/app/app.theme.scss colorTheme : 'theme-default', + customScrollbars: true, layout : { style : 'vertical-layout-1', width : 'fullwidth', @@ -38,6 +39,5 @@ export const fuseConfig: FuseConfig = { hidden : false, position: 'right' } - }, - customScrollbars: true + } };