Group API
Group API
The group API controls a single group of panels: its active panel, location, and header.
Use the group API sparingly. As you move panels, groups change and if you don't track this correctly you may encounter unexpected behaviours. You should be able to achieve most things directly through the panel API.
component | The id of the component renderer
|
|---|---|
height | The panel height in pixels
|
id | The id of the panel that would have been assigned when the panel was created
|
isActive | Whether the panel is the actively selected panel
|
isFocused | Whether the panel holds the current focus
|
isVisible | Whether the panel is visible
|
onDidActiveChange |
|
onDidDimensionsChange |
|
onDidFocusChange |
|
onDidParametersChange |
|
onDidVisibilityChange |
|
onWillFocus |
|
width | The panel width in pixels
|
getParameters |
|
setActive |
|
setVisible |
|
updateParameters |
|
onDidConstraintsChange |
|
setConstraints |
|
setSize |
|
location |
|
locked | Whether this group is locked against drop interactions.
- true: panels cannot be dropped into the group (center / tabs),
but the group can still be split from its edges.
- 'no-drop-target': all drop zones are disabled for this group.
|
onDidActivePanelChange | Fires when the active panel *within this group* changes. Scoped to the
group, in contrast to the component-level
DockviewApi.onDidActivePanelChange (which tracks the active panel across
the whole dockview). Both carry an DockviewOrigin reporting
whether the change came from a user gesture or an API call.
|
onDidCollapsedChange | Fired when an edge group's collapsed state changes.
Never fires for non-edge groups.
|
onDidHeaderDirectionChange | Fires when this group's header flips orientation between horizontal
(top/bottom) and vertical (left/right), e.g. when headerPosition
moves from top to left. Does not fire for position changes that
keep the same axis (top↔bottom, left↔right) or for the initial set.
|
onDidLocationChange |
|
onDidPeekChange | Fired when an edge group's auto-hide *peek* state changes (the slid-out
overlay shown/hidden while the group stays logically collapsed). Never
fires for non-edge groups or without the auto-hide module.
|
close |
|
collapse | Collapse this group (edge groups only). No-op for non-edge groups.
|
exitMaximized |
|
expand | Expand this group (edge groups only). No-op for non-edge groups.
|
getHeaderPosition |
|
getWindow | If you require the Window object
|
isAutoHide | The resolved auto-hide state of this edge group: the per-group override
if one is set, otherwise the global autoHideEdgeGroups option for this
edge. Always returns false for non-edge groups.
|
isCollapsed | Returns true if this edge group is currently collapsed.
Always returns false for non-edge groups.
|
isMaximized |
|
isPeeking | True while this edge group is peeking (auto-hide slid-out overlay).
|
maximize |
|
moveTo |
|
setAutoHide | Opt this edge group in/out of auto-hide (pinnable tool-window) behaviour
at runtime, overriding the global autoHideEdgeGroups option. Pass
undefined to clear the override and inherit the global. No-op for
non-edge groups or without the auto-hide module.
|
setHeaderPosition |
|
See also
- Add a group: how groups are created and populated.
- Add a panel: the panels a group contains.