@mantlebee/ts-data
    Preparing search index...

    Class FilterRange<TValue>

    Editable Range, meant for UI controls: two FilterRangeLimit whose changes raise a single change event with the resulting range.

    const price = new FilterRange<number>();
    price.on("change", (range) =>
    filtering.replaceFiltersOf("price", {
    field: "price",
    operator: FilterOperators.range,
    value: range,
    }),
    );
    price.min.setValue(10); // change: { min: { value: 10, exclude: false }, max: null }
    price.max.setValue(20); // change: both limits set, price.isClosed is now true

    Type Parameters

    • TValue = Any

      Type of the limits.

    Hierarchy

    Index
    • Type Parameters

      • TValue = any

        Type of the limits.

      Parameters

      • min: Nullable<TValue> = null

        Initial minimum, null when unset.

      • max: Nullable<TValue> = null

        Initial maximum, null when unset.

      • excludeMin: boolean = false

        Initial exclusion of the minimum.

      • excludeMax: boolean = false

        Initial exclusion of the maximum.

      Returns FilterRange<TValue>

    _eventBus: EventBus<FilterRangeEvents<TValue>>

    Bus used to register handlers and to raise the events.

    Upper limit.

    Lower limit.

    • Registers a handler for an event.

      Type Parameters

      • TKey extends string

        Name of the event to listen to.

      Parameters

      Returns IDisposable

      a subscription; dispose it to remove this single handler.