facy - v0.1.0
    Preparing search index...

    Class InputTag<T, V>

    Subclass of StylableTag that manages input elements, allowing them to be bound to reactive values. This is not limited to HTMLInputElement, but also supports HTMLTextAreaElement and HTMLSelectElement.

    Tag.input for convenient factory methods for all different use cases.

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Establishes two-way binding between the input value and the given reactive value. This means that when one changes, the other is updated accordingly.

      Checkboxes, radio boxes and select options can or need to be associated with a value that should be used when a specific option is selected. To accomplish this, you can call ElementTag.withValue on them or in case of check and radio just use InputTag.bindValue:OPTION, which does this for you and provides better type checking.

      Parameters

      • value: ReactiveValue<V>

      Returns this

    • Like InputTag.bindValue:DIRECT, but allows passing an additional option value to be used when radio or check boxes are selected.

      This is equivalent to bindValue(value).withValue(option), but ensures the given value and option types are compatible.

      For any input type besides radio or check, this has no use and the option is ignored.

      For more details on each use case, see

      Type Parameters

      • O

      Parameters

      • value: ReactiveValue<V extends boolean ? O[] | Set<O> : V>
      • option: O

      Returns this