Add inputElement field to the MaskedInput instance

MaskedInput provides inputElement field, that is used internally for rendering and which is accessible from outside via ref. For accessing this field for ref its required to type in the MaskedInput instance
This commit is contained in:
Dmitriy Kovalenko
2018-12-21 13:40:17 +02:00
committed by GitHub
parent f91a63c5e3
commit 342e1a0bb8
+4 -2
View File
@@ -10,7 +10,7 @@ import * as React from "react";
export type maskArray = Array<string | RegExp>;
export interface MaskedInputProps
export interface MaskedInputProps
extends React.InputHTMLAttributes<HTMLInputElement> {
mask?: maskArray | ((value: string) => maskArray);
@@ -40,7 +40,9 @@ export interface conformToMaskResult {
export default class MaskedInput extends React.Component<
MaskedInputProps,
any
> {}
> {
inputElement: HTMLElement;
}
export function conformToMask(
text: string,