From 5af61b3ed98e8114e56fd7fd447bffb764b0ef9b Mon Sep 17 00:00:00 2001 From: Greg Solomon Date: Thu, 23 May 2024 15:01:37 -0400 Subject: [PATCH] Test new DynamicTabSwitcher in main appBar --- client-app/src/desktop/AppComponent.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/client-app/src/desktop/AppComponent.ts b/client-app/src/desktop/AppComponent.ts index 88071880a..273104134 100755 --- a/client-app/src/desktop/AppComponent.ts +++ b/client-app/src/desktop/AppComponent.ts @@ -4,7 +4,7 @@ import {webSocketIndicator} from '@xh/hoist/cmp/websocket'; import {hoistCmp, uses} from '@xh/hoist/core'; import {appBar, appBarSeparator} from '@xh/hoist/desktop/cmp/appbar'; import {panel} from '@xh/hoist/desktop/cmp/panel'; -import {tabSwitcher} from '@xh/hoist/desktop/cmp/tab'; +import {dynamicTabSwitcher} from '@xh/hoist/desktop/cmp/tab'; import {welcomeMsg} from '../core/cmp/WelcomeMsg'; // @ts-ignore import xhLogo from '../core/img/xh-toolbox-logo.png'; @@ -21,7 +21,14 @@ export const AppComponent = hoistCmp({ tbar: appBar({ icon: img({src: xhLogo, onClick: () => model.goHome()}), title: null, - leftItems: [tabSwitcher({enableOverflow: true})], + leftItems: [ + dynamicTabSwitcher({ + modelConfig: { + persistWith: {prefKey: 'appState'}, + tabContainerModel: model.tabModel + } + }) + ], rightItems: [ webSocketIndicator({iconOnly: true, marginRight: 4}), appBarSeparator()