Class InGroup<TModel>Abstract

A group of input controls.

Nested controls are identified by keys and can be added and removed via controls property.

Group value (called model) is an object formed by nested control values. The model property value is the one of the control with the same key, if present. When model is updated corresponding controls are also updated.

Group is available as an aspect of itself and converted controls with the same value.

Type Parameters

  • TModel extends object

    Group model type, i.e. its value type.

Hierarchy

Constructors

Properties

controls: InGroupControls<TModel>

Input group controls.

it: TModel

Input value.

on: OnEvent<[TModel, TModel]>

OnEvent sender of value changes.

The [OnEvent__symbol] property is an alias of this one.

Returns

Value changes sender.

read: AfterEvent<[TModel]>

AfterEvent keeper of current value.

The [AfterEvent__symbol] property is an alias of this one.

Returns

Current value keeper.

Accessors

  • get supply(): Supply
  • This control's input supply.

    Releases all control resources when cut off.

    Each control has its own supply. An input supply of converted control depends on the input supply of control it is converted from.

    After this supply cut off the control should no longer be used.

    Returns Supply

Methods

  • Returns AfterEvent<[TModel]>

  • Returns OnEvent<[TModel, TModel]>

  • Updates the tracked value by the given value supplier.

    If the value is already updated by another supplier, then unbinds from the old one first.

    Call the byNone method to unbind the tracked value from the source.

    Note that explicitly updating the value would override the value received from the source.

    Parameters

    • supplier: EventSupplier<[TModel]>

      The source value sender or keeper.

    Returns InGroup<TModel>

    this instance.

  • Updates the tracked value by value suppliers extracted from events sent by the given supplier.

    If the value is already updated by another value supplier, then unbinds from the old one first.

    Call the byNone method to unbind the tracked value from the source.

    Note that explicitly updating the value would override the value received from the source.

    Type Parameters

    • TSrcEvent extends any[]

      Source event type.

    Parameters

    • supplier: EventSupplier<TSrcEvent>

      The event supplier to extract value suppliers from.

    • extract: ((this, ...event) => undefined | EventSupplier<[TModel]>)

      A function extracting value supplier from event received from supplier. May return undefined to suspend receiving values.

        • (this, ...event): undefined | EventSupplier<[TModel]>
        • Parameters

          • this: void
          • Rest ...event: TSrcEvent

          Returns undefined | EventSupplier<[TModel]>

    Returns InGroup<TModel>

    this instance.

  • Unbinds the tracked value from any value supplier this tracker is updated by.

    If the tracker is not bound then does nothing.

    Parameters

    • Optional reason: unknown

      Arbitrary reason of unbinding the value.

    Returns InGroup<TModel>

    this instance.

  • Performs additional setup of this control.

    Parameters

    • setup: ((this, control) => void)

      A function that accepts this control as its only parameter.

        • (this, control): void
        • Parameters

          • this: void
          • control: InGroup<TModel>

          Returns void

    Returns InGroup<TModel>

    this control instance.

  • Performs additional setup of this control's aspect.

    Type Parameters

    • TInstance

      Aspect instance type.

    • TKind extends keyof InAspect.Application.Map<unknown, unknown>

      Aspect application kind.

    Parameters

    • aspectKey: Key<TInstance, TKind>

      A key of aspect to set up.

    • setup: ((this, aspect, control) => void)

      A function that accepts an applied aspect instance and this control as parameters.

        • (this, aspect, control): void
        • Parameters

          Returns void

    Returns InGroup<TModel>

    this control instance.

Generated using TypeDoc