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

    Interface CreateSearchBarStateOptions

    Options accepted by createSearchBarState.

    interface CreateSearchBarStateOptions {
        defaultQuery?: string;
        defaultScopeId?: string;
        disabled?: boolean;
        onClear?: () => void;
        onQueryChange?: (query: string) => void;
        onScopeChange?: (scopeId: string) => void;
        onSubmit?: (submission: SearchBarSubmission) => void;
        query?: string;
        scopeId?: string;
        scopes?: readonly SearchBarScope[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    defaultQuery?: string

    Initial query for uncontrolled usage.

    defaultScopeId?: string

    Initial scope id for uncontrolled usage. Defaults to the first scope.

    disabled?: boolean

    Whether state-changing and submission requests are rejected.

    onClear?: () => void

    Called after an enabled clear request.

    onQueryChange?: (query: string) => void

    Called when an enabled query change is requested.

    onScopeChange?: (scopeId: string) => void

    Called when an enabled scope change is requested.

    onSubmit?: (submission: SearchBarSubmission) => void

    Called when an enabled submission is requested.

    query?: string

    Controlled query.

    scopeId?: string

    Controlled scope id.

    scopes?: readonly SearchBarScope[]

    Ordered search scopes.