@gustavo-valsechi/client 1.4.151 → 1.4.152
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.
|
@@ -87,10 +87,15 @@ function InputSelect(props) {
|
|
|
87
87
|
event.target.value = props.mask ? props.mask(value2) : value2;
|
|
88
88
|
setFilter(value2);
|
|
89
89
|
if (props.onFilter) props.onFilter(value2);
|
|
90
|
+
if (register.onChange) register.onChange(event);
|
|
90
91
|
const optionsElement = document.getElementById(`input-${props.name}-options`);
|
|
91
92
|
if (!optionsElement) return;
|
|
92
93
|
optionsElement.setAttribute("value", value2);
|
|
93
94
|
};
|
|
95
|
+
const onClick = (event) => {
|
|
96
|
+
inputRef.current.focus();
|
|
97
|
+
if (register.onClick) register.onClick(event);
|
|
98
|
+
};
|
|
94
99
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { className: props.className, error: props.error, children: [
|
|
95
100
|
!!props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_label.InputLabel, { children: [
|
|
96
101
|
props.label,
|
|
@@ -109,13 +114,13 @@ function InputSelect(props) {
|
|
|
109
114
|
ref: inputRef,
|
|
110
115
|
type: "text",
|
|
111
116
|
maxLength: props.maxLength || 255,
|
|
112
|
-
onChange,
|
|
113
|
-
onFocus,
|
|
114
|
-
onBlur,
|
|
115
|
-
onClick: () => inputRef.current.focus(),
|
|
116
117
|
value: focus ? filter : inputValue,
|
|
117
118
|
placeholder: import_lodash.default.isString(value) ? value : (value == null ? void 0 : value.textContent) || "",
|
|
118
|
-
...register
|
|
119
|
+
...register,
|
|
120
|
+
onBlur,
|
|
121
|
+
onFocus,
|
|
122
|
+
onChange,
|
|
123
|
+
onClick
|
|
119
124
|
}
|
|
120
125
|
),
|
|
121
126
|
!focus && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -54,10 +54,15 @@ function InputSelect(props) {
|
|
|
54
54
|
event.target.value = props.mask ? props.mask(value2) : value2;
|
|
55
55
|
setFilter(value2);
|
|
56
56
|
if (props.onFilter) props.onFilter(value2);
|
|
57
|
+
if (register.onChange) register.onChange(event);
|
|
57
58
|
const optionsElement = document.getElementById(`input-${props.name}-options`);
|
|
58
59
|
if (!optionsElement) return;
|
|
59
60
|
optionsElement.setAttribute("value", value2);
|
|
60
61
|
};
|
|
62
|
+
const onClick = (event) => {
|
|
63
|
+
inputRef.current.focus();
|
|
64
|
+
if (register.onClick) register.onClick(event);
|
|
65
|
+
};
|
|
61
66
|
return /* @__PURE__ */ jsxs(Container, { className: props.className, error: props.error, children: [
|
|
62
67
|
!!props.label && /* @__PURE__ */ jsxs(InputLabel, { children: [
|
|
63
68
|
props.label,
|
|
@@ -76,13 +81,13 @@ function InputSelect(props) {
|
|
|
76
81
|
ref: inputRef,
|
|
77
82
|
type: "text",
|
|
78
83
|
maxLength: props.maxLength || 255,
|
|
79
|
-
onChange,
|
|
80
|
-
onFocus,
|
|
81
|
-
onBlur,
|
|
82
|
-
onClick: () => inputRef.current.focus(),
|
|
83
84
|
value: focus ? filter : inputValue,
|
|
84
85
|
placeholder: _.isString(value) ? value : (value == null ? void 0 : value.textContent) || "",
|
|
85
|
-
...register
|
|
86
|
+
...register,
|
|
87
|
+
onBlur,
|
|
88
|
+
onFocus,
|
|
89
|
+
onChange,
|
|
90
|
+
onClick
|
|
86
91
|
}
|
|
87
92
|
),
|
|
88
93
|
!focus && /* @__PURE__ */ jsx(
|