• The base React component integrated with !AutoNumeric.

    This component is used as a base to construct higher-level React component that integrates with AutoNumeric. See AutoNumericInput for a live example. For some elements, you would also need to set the contenteditable attribute to true.

    Parameters

    • options: {
          autoNumericOptions?: Readonly<CallbackOptions>;
          element: string | FunctionComponent<{}> | ComponentClass<{}, any>;
          props?: Readonly<undefined | null | Attributes>;
          refKey: string;
          state?: Readonly<NonNullable<null | string | number>>;
      }

      Options of the component.

      • OptionalautoNumericOptions?: Readonly<CallbackOptions>

        Options passed to !AutoNumeric. Same as AutoNumeric!Options.

      • element: string | FunctionComponent<{}> | ComponentClass<{}, any>

        The element of the component, such as "input".

      • Optionalprops?: Readonly<undefined | null | Attributes>

        Options passed to the underlying element options.element.

      • refKey: string

        The name of the attribute that refers the underlying DOM element. This is typically "ref".

      • Optionalstate?: Readonly<NonNullable<null | string | number>>

        The React state that controls and is controlled by !AutoNumeric. If absent, this component will not interact with its parent via React states.

    Returns JSX.Element