@true-engineering/true-react-common-ui-kit 3.57.0 → 3.58.0
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.
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/true-react-common-ui-kit.js +2 -2
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +2 -2
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/Input/Input.tsx +7 -3
|
@@ -46,7 +46,7 @@ export interface IInputProps extends ICommonProps<IInputStyles>, IReactInputMask
|
|
|
46
46
|
shouldFocusOnMount?: boolean;
|
|
47
47
|
/** @default false */
|
|
48
48
|
shouldAlwaysShowPlaceholder?: boolean;
|
|
49
|
-
onChange: (value: string, event: FormEvent<HTMLInputElement
|
|
49
|
+
onChange: (value: string, event: FormEvent<HTMLInputElement>, eventType: 'change' | 'clear') => void;
|
|
50
50
|
onIconClick?: () => void;
|
|
51
51
|
}
|
|
52
52
|
export declare const Input: import("react").ForwardRefExoticComponent<IInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -10389,7 +10389,7 @@ var Input = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
10389
10389
|
var _useState = _sliced_to_array$j(useState(false), 2), isFocused = _useState[0], setFocused = _useState[1];
|
|
10390
10390
|
var inputRef = useRef(null);
|
|
10391
10391
|
var handleChange = function(event) {
|
|
10392
|
-
onChange(event.currentTarget.value, event);
|
|
10392
|
+
onChange(event.currentTarget.value, event, "change");
|
|
10393
10393
|
};
|
|
10394
10394
|
var handleFocus = function(event) {
|
|
10395
10395
|
setFocused(true);
|
|
@@ -10407,7 +10407,7 @@ var Input = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
10407
10407
|
case 0:
|
|
10408
10408
|
return [
|
|
10409
10409
|
4,
|
|
10410
|
-
onChange("", event)
|
|
10410
|
+
onChange("", event, "clear")
|
|
10411
10411
|
];
|
|
10412
10412
|
case 1:
|
|
10413
10413
|
_state.sent();
|