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

    Interface FocusScopeModel

    Headless focus capture, navigation, and restoration state.

    interface FocusScopeModel {
        activate(previousFocusId?: string): string | undefined;
        deactivate(): string | undefined;
        current(): string | undefined;
        focus(id: string): string | undefined;
        next(): string | undefined;
        previous(): string | undefined;
    }
    Index

    Methods

    • Activates the scope and captures the identifier that should regain focus.

      Parameters

      • OptionalpreviousFocusId: string

      Returns string | undefined

      The item that should receive initial focus.

    • Deactivates the scope.

      Returns string | undefined

      The captured identifier that should regain focus.

    • Moves focus to an enabled item while active.

      Parameters

      • id: string

      Returns string | undefined