@agility/plenum-ui 2.0.0-rc42 → 2.0.0-rc43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25,8 +25,6 @@ export interface IInputFieldProps extends Omit<React.InputHTMLAttributes<HTMLInp
|
|
|
25
25
|
clientSideCheck?: boolean;
|
|
26
26
|
/** Placeholder text */
|
|
27
27
|
placeholder?: string;
|
|
28
|
-
/**ref for input */
|
|
29
|
-
ref?: React.Ref<HTMLInputElement>;
|
|
30
28
|
}
|
|
31
|
-
declare const
|
|
32
|
-
export default
|
|
29
|
+
declare const _InputField: React.ForwardRefExoticComponent<IInputFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
30
|
+
export default _InputField;
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react"
|
|
1
|
+
import React, { forwardRef } from "react"
|
|
2
2
|
import { default as cn } from "classnames"
|
|
3
3
|
|
|
4
4
|
export type AcceptedInputTypes =
|
|
@@ -41,26 +41,27 @@ export interface IInputFieldProps extends Omit<React.InputHTMLAttributes<HTMLInp
|
|
|
41
41
|
/** Placeholder text */
|
|
42
42
|
placeholder?: string
|
|
43
43
|
/**ref for input */
|
|
44
|
-
ref?: React.Ref<HTMLInputElement>
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
const InputField
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
46
|
+
const InputField = (
|
|
47
|
+
{
|
|
48
|
+
type,
|
|
49
|
+
id,
|
|
50
|
+
name,
|
|
51
|
+
value,
|
|
52
|
+
isFocused,
|
|
53
|
+
isError,
|
|
54
|
+
isReadonly,
|
|
55
|
+
isDisabled,
|
|
56
|
+
handleChange,
|
|
57
|
+
required,
|
|
58
|
+
clientSideCheck = true,
|
|
59
|
+
className,
|
|
60
|
+
placeholder,
|
|
61
|
+
...rest
|
|
62
|
+
}: IInputFieldProps,
|
|
63
|
+
ref: React.Ref<HTMLInputElement>
|
|
64
|
+
) => {
|
|
64
65
|
return (
|
|
65
66
|
<input
|
|
66
67
|
{...{
|
|
@@ -91,4 +92,5 @@ const InputField: React.FC<IInputFieldProps> = ({
|
|
|
91
92
|
)
|
|
92
93
|
}
|
|
93
94
|
|
|
94
|
-
|
|
95
|
+
const _InputField = forwardRef<HTMLInputElement, IInputFieldProps>(InputField)
|
|
96
|
+
export default _InputField
|