Add ModelView method SetItemLayout (#10306)

* Add ModelView method SetItemLayout

* Remove extra line break
This commit is contained in:
Charles Gagnon
2020-05-08 08:38:36 -07:00
committed by GitHub
parent e3daec38c6
commit 6e5fc9c495
13 changed files with 101 additions and 21 deletions

View File

@@ -5,7 +5,7 @@
import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, forwardRef, Inject, Input, OnDestroy, ViewChild } from '@angular/core';
import { NavigationBarLayout, PanelComponent } from 'sql/base/browser/ui/panel/panel.component';
import { TabType } from 'sql/base/browser/ui/panel/tab.component';
import { ContainerBase } from 'sql/workbench/browser/modelComponents/componentBase';
import { ContainerBase, ItemDescriptor } from 'sql/workbench/browser/modelComponents/componentBase';
import { ComponentEventType, IComponent, IComponentDescriptor, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
import 'vs/css!./media/tabbedPanel';
import { IUserFriendlyIcon, createIconCssClass } from 'sql/workbench/browser/modelComponents/iconUtils';
@@ -121,4 +121,8 @@ export default class TabbedPanelComponent extends ContainerBase<TabConfig> imple
this._panel.selectTab(firstTabIndex);
}
}
onItemLayoutUpdated(item: ItemDescriptor<TabConfig>): void {
this._panel.updateTab(item.config.id, { title: item.config.title, iconClass: item.config.icon ? createIconCssClass(item.config.icon) : undefined });
}
}