formcycle 8.4.0 - JavaScript for forms
    Preparing search index...

    Interface NumberFormatApiLifecycle

    The API for the lifecycle of NumberFormat elements, such as initialization and destruction.

    The API is available via $.xutil.numberFormat.lifecycle.

    interface NumberFormatApiLifecycle {
        destroy: (reference: any) => void;
        hasNumberFormat: (reference: any) => boolean;
        initialize: (
            element: HTMLElement,
            options?: Partial<NumberFormatOptions>,
        ) => string;
    }
    Index

    Properties

    destroy: (reference: any) => void

    Destroys the existing NumberFormat instance for all given elements.

    Type declaration

      • (reference: any): void
      • Parameters

        • reference: any

          The element to destroy the instance for.

        Returns void

    If the element does not have an NumberFormat instance.

    hasNumberFormat: (reference: any) => boolean

    Checks if the first of the given elements has an NumberFormat instance.

    Type declaration

      • (reference: any): boolean
      • Parameters

        • reference: any

          The element to check.

        Returns boolean

        True if the element has an NumberFormat instance, false otherwise.

    initialize: (
        element: HTMLElement,
        options?: Partial<NumberFormatOptions>,
    ) => string

    Initializes the NumberFormat feature for the given element.

    Type declaration

      • (element: HTMLElement, options?: Partial<NumberFormatOptions>): string
      • Parameters

        • element: HTMLElement

          The element to initialize the feature for.

        • Optionaloptions: Partial<NumberFormatOptions>

          The options to use for the feature.

        Returns string

        The ID of the newly created NumberFormat instance.

    If the element was already initialized with the NumberFormat feature.