Merge pull request #570 from mathuo/569-expose-panel-component-id-via-the-panelapi

feat: expose api.(tab)component
This commit is contained in:
mathuo 2024-04-15 21:00:24 +01:00 committed by GitHub
commit ce3706d1b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

@ -31,6 +31,12 @@ export interface DockviewPanelApi
// omit properties that do not make sense here
'setVisible' | 'onDidConstraintsChange' | 'setConstraints'
> {
/**
* The id of the tab component renderer
*
* Undefined if no custom tab renderer is provided
*/
readonly tabComponent: string | undefined;
readonly group: DockviewGroupPanel;
readonly isGroupActive: boolean;
readonly renderer: DockviewPanelRenderer;

View File

@ -28,6 +28,10 @@ export interface PanelApi {
setActive(): void;
setVisible(isVisible: boolean): void;
updateParameters(parameters: Parameters): void;
/**
* The id of the component renderer
*/
readonly component: string;
/**
* The id of the panel that would have been assigned when the panel was created
*/