Open Pioneer Trails Packages
    Preparing search index...

    Interface SelectionSource

    An object that allows spatial selection.

    Developers can create classes that implement this interface for different selection sources.

    interface SelectionSource {
        id?: string;
        label: string;
        status?: SelectionSourceStatus;
        select(
            selectionKind: ExtentSelection,
            options: SelectionOptions,
        ): Promise<SelectionResult[]>;
    }

    Hierarchy (View Summary)

    Index
    id?: string

    The id of this source.

    Must be unique across all selection sources used within the same selection component.

    The id must not change while the source is in use (this value is not reactive). If no id is defined, the selection component generates one internally.

    label: string

    The label of this source.

    This will be displayed by the user interface during selection source selection.

    The optional status of this source. If there is no status defined, it is assumed that the source is always available.

    This will be displayed by the user interface.

    This value can be reactive; changes will be reflected in the UI.

    • Performs a selection and returns a list of selection results.

      Implementations should return the results ordered by priority (best match first), if possible.

      The provided AbortSignal in options.signal is used to cancel outdated requests.

      NOTE: If your selection source implements custom error handling (i.e. try/catch), it is good practice to forward abort errors without modification. This will enable the selection widget to differentiate real errors from cancellations.

      Parameters

      Returns Promise<SelectionResult[]>