@nextcloud/files
    Preparing search index...

    Interface ISidebar

    interface ISidebar {
        activeTab?: string;
        available: boolean;
        isOpen: boolean;
        node?: INode;
        close(): void;
        getActions(context?: ISidebarContext): ISidebarAction[];
        getTabs(context?: ISidebarContext): ISidebarTab[];
        open(node: INode, tab?: string): void;
        registerAction(action: ISidebarAction): void;
        registerTab(tab: ISidebarTab): void;
        setActiveTab(tabId: string): void;
    }
    Index

    Properties

    activeTab?: string

    The currently active sidebar tab id

    available: boolean

    If the files sidebar can currently be accessed. Registering tabs also works if the sidebar is currently not available.

    isOpen: boolean

    The current open state of the sidebar

    node?: INode

    The currently opened node in the sidebar

    Methods

    • Close the sidebar.

      When the sidebar is fully closed the files:sidebar:closed event is emitted, see also @nextcloud/event-bus.

      Returns void

    • Open the sidebar for a specific node.

      When the sidebar is fully opened the files:sidebar:opened event is emitted, see also @nextcloud/event-bus.

      Parameters

      • node: INode

        The node to open the sidebar for

      • Optionaltab: string

        The tab to open by default

      Returns void

    • Register a new sidebar tab. This should ideally be done on app initialization using Nextcloud init scripts.

      Parameters

      Returns void

    • Set the active sidebar tab

      Parameters

      • tabId: string

        The tab to set active

      Returns void