rc-dock
    Preparing search index...

    Interface DockContext

    Layout API available through a DockLayout ref or a panel header callback.

    interface DockContext {
        dockMove(
            source: PanelBase | TabBase,
            target: string | PanelData | BoxData | TabData,
            direction: DropDirection,
            floatPosition?: FloatPosition,
        ): void;
        find(
            id: string | ((item: PanelData | BoxData | TabData) => boolean),
            filter?: Filter,
        ): PanelData | BoxData | TabData;
        getGroup(name: string): TabGroup;
        navigateToPanel(fromElement: HTMLElement, direction?: string): void;
        updateTab(id: string, newTab: TabBase, makeActive?: boolean): boolean;
    }

    Implemented by

    Index

    Methods

    • Focus the active tab in a nearby panel.

      Parameters

      • fromElement: HTMLElement

        Element in the starting panel; omit with no direction to focus the active tab.

      • Optionaldirection: string

        ArrowLeft, ArrowRight, ArrowUp or ArrowDown; omit to focus fromElement.

      Returns void

    • Replace an open tab's definition, optionally activating it.

      Parameters

      • id: string

        Existing tab id.

      • newTab: TabBase

        Full definition or {id} reference; null leaves the definition unchanged.

      • OptionalmakeActive: boolean

        Select the updated tab. Defaults to true.

      Returns boolean

      False if the tab is missing or its replacement cannot be resolved.