Static properties and methods related to the repeating units

Hierarchy

  • RepeatingUnits

Constructors

Methods

  • Adds a repeating unit.

    Parameters

    • repeatingUnitId: string

      The id of the repeating unit.

    • Optional index: number

      The index, the repeating unit should be added at.

    • Optional autoSaveOnAdd: boolean

      default true. Control auto save of form if repeating unit was added.

    • Optional enableScroll: boolean

      default true. Control if auto scroll to newly created unit is active or not.

    • Optional setInitialStatus: boolean

      default true. Control if StatusWatcher gets initialized or not.

    Returns Promise<number>

  • Adds a repeating unit dynamically. Mainly for AdaptiveForms

    Parameters

    • tabId: string

      The id of the repeating unit.

    • Optional index: number

      The index, the repeating unit should be added at.

    Returns Promise<number>

  • Adds an event listener to the repeating unit.

    Parameters

    • repeatingUnitId: string

      The id of the repeating unit.

    • type: "removed" | "beforeadd" | "added" | "beforeremove"

      The type of the event listener. Allowed types are defined in RepeatingUnitEventsEnum.

    • callback: ((result: number) => void | Promise<void>)

      The callback function, that gets called after the event is fired.

        • (result: number): void | Promise<void>
        • Parameters

          • result: number

          Returns void | Promise<void>

    Returns void

  • Returns the count of the repeating units.

    Parameters

    • repeatingUnitId: string

      The id of the repeating unit.

    Returns number

  • Finds the repeating unit tab, if found, the tab is returned.

    Parameters

    • repeatingUnitId: string

      The id of the repeating unit.

    Returns ITab

  • Gets the instance of the RepeatingUnit by given Id.

    Parameters

    • repeatingUnitId: string

      The id of the repeating unit.

    Returns any

  • Gets the element, that the repeating unit is included

    Parameters

    • repeatingUnitId: string

      The id of the repeating unit.

    Returns HTMLElement

  • Gets the postfix id of an certain HTML Element. this is often useful, if you wish to change, set etc. a certain form control value at a certain repeating unit index position.

    Parameters

    • element: HTMLElement

    Returns string

  • Gets the id of the repeating unit, if the provided field id is included in a repeating unit.

    Parameters

    • fieldId: string

    Returns string

  • Gets the repeating unit index of an certain HTML Element.

    Parameters

    • element: HTMLElement

    Returns number

  • Checks if an element is included in a repeating unit;

    Parameters

    • element: HTMLElement

    Returns boolean

  • Removes a repeating unit at a certain index.

    Parameters

    • repeatingUnitId: string

      The id of the repeating unit.

    • index: number

      The index, the repeating unit should be removed at.

    • Optional autoSaveOnRemove: boolean

      default true. Control auto save of form if repeating unit was removed.

    • Optional enableScroll: boolean

      default true. Control if auto scroll to newly created unit is active or not.

    Returns Promise<number>

  • Always remove previously registered events

    Parameters

    • repeatingUnitId: string

      The id of the repeating unit.

    • type: "removed" | "beforeadd" | "added" | "beforeremove"

      The type of the event listener. Allowed types are defined in RepeatingUnitEventsEnum.

    • callback: ((result: number) => void | Promise<void>)

      The callback function, that gets called after the event is fired.

        • (result: number): void | Promise<void>
        • Parameters

          • result: number

          Returns void | Promise<void>

    Returns void

Generated using TypeDoc