blessed-components - v1.20.0
    Preparing search index...

    Interface AccordionHandle

    Imperative handle returned by accordion.

    interface AccordionHandle {
        activeId(): string | undefined;
        focus(): void;
        focusSection(id: string): string | undefined;
        next(): string | undefined;
        previous(): string | undefined;
        sections(): ReadonlyMap<string, CollapsibleHandle>;
        setSectionExpanded(id: string, expanded: boolean): boolean;
        toggleFocused(): boolean;
        value(): readonly string[];
        element: BoxElement;
        destroy(): void;
        setData(data: AccordionData): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    element: BoxElement

    Underlying Blessed element available for standard element operations.

    Methods

    • Moves focus to a section identifier.

      Parameters

      • id: string

      Returns string | undefined

    • Moves focus to the previous enabled section, wrapping at the start.

      Returns string | undefined

    • Sets one section expanded state and reports whether setting occurred.

      Parameters

      • id: string
      • expanded: boolean

      Returns boolean