Skip to main content

Move panel

A panel can be relocated to a different group and position without being destroyed and re-created. Use moveTo on the panel API to reposition it relative to another group and index.

Methods

moveTo
moveTo(options: DockviewGroupMoveParams): void

Move a panel

You can move a panel through the Panel API and you can find out how to move a group here.

panel.api.moveTo({ group, position, index });

An equivalent method for moving groups is available on the group api.

const group = panel.api.group;
group.api.moveTo({ group, position });

See also

  • Move group: move a whole group rather than a single panel.
  • Adding panels: position a panel at creation time with the same direction semantics.
  • Panel API: the panel API surface that exposes moveTo.