@gustavo-valsechi/client 1.4.151 → 1.4.153
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,
|
|
@@ -106,16 +111,16 @@ function InputSelect(props) {
|
|
|
106
111
|
"input",
|
|
107
112
|
{
|
|
108
113
|
...import_lodash.default.omit(props, ["className", "register", "mask", "setValue", "watch"]),
|
|
109
|
-
ref: inputRef,
|
|
110
114
|
type: "text",
|
|
111
115
|
maxLength: props.maxLength || 255,
|
|
112
|
-
onChange,
|
|
113
|
-
onFocus,
|
|
114
|
-
onBlur,
|
|
115
|
-
onClick: () => inputRef.current.focus(),
|
|
116
116
|
value: focus ? filter : inputValue,
|
|
117
117
|
placeholder: import_lodash.default.isString(value) ? value : (value == null ? void 0 : value.textContent) || "",
|
|
118
|
-
...register
|
|
118
|
+
...register,
|
|
119
|
+
ref: inputRef,
|
|
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,
|
|
@@ -73,16 +78,16 @@ function InputSelect(props) {
|
|
|
73
78
|
"input",
|
|
74
79
|
{
|
|
75
80
|
..._.omit(props, ["className", "register", "mask", "setValue", "watch"]),
|
|
76
|
-
ref: inputRef,
|
|
77
81
|
type: "text",
|
|
78
82
|
maxLength: props.maxLength || 255,
|
|
79
|
-
onChange,
|
|
80
|
-
onFocus,
|
|
81
|
-
onBlur,
|
|
82
|
-
onClick: () => inputRef.current.focus(),
|
|
83
83
|
value: focus ? filter : inputValue,
|
|
84
84
|
placeholder: _.isString(value) ? value : (value == null ? void 0 : value.textContent) || "",
|
|
85
|
-
...register
|
|
85
|
+
...register,
|
|
86
|
+
ref: inputRef,
|
|
87
|
+
onBlur,
|
|
88
|
+
onFocus,
|
|
89
|
+
onChange,
|
|
90
|
+
onClick
|
|
86
91
|
}
|
|
87
92
|
),
|
|
88
93
|
!focus && /* @__PURE__ */ jsx(
|