Static properties and methods related to the repeating units

Constructors

Methods

  • Adds a repeating unit.

    Parameters

    • repeatingUnitId: string

      The id of the repeating unit.

    • Optionalindex: number

      The index, the repeating unit should be added at.

    • OptionalautoSaveOnAdd: boolean

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

    • OptionalenableScroll: boolean

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

    • OptionalsetInitialStatus: 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.

    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.

    Returns void

  • Adds multiple repeating units dynamically. Mainly for AdaptiveForms

    Parameters

    • tabId: string

      The id of the repeating unit.

    • count: number

      The count of repeating units to add.

    Returns Promise<number>

  • 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 data source of a repeating unit if a mapping is defined.

    Type Parameters

    • T extends { ID: string }

    Parameters

    • tabId: string

      The id of the repeating unit.

    Returns T[]

  • 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.

    • OptionalautoSaveOnRemove: boolean

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

    • OptionalenableScroll: 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.

    Returns void

  • Sets the data source of a repeating unit if a mapping is defined.

    Type Parameters

    • T extends { ID: string }

    Parameters

    • tabId: string

      The id of the repeating unit.

    Returns Promise<T[]>