@gustavo-valsechi/client 1.4.145 → 1.4.146

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.
@@ -75,7 +75,7 @@ function InputSelect(props) {
75
75
  const onFocus = (event) => {
76
76
  setFocus(true);
77
77
  if (register.onFocus) register.onFocus(event);
78
- const optionsElement = document.getElementById("input-options");
78
+ const optionsElement = document.getElementById(`input-${props.name}-options`);
79
79
  if (!optionsElement) return;
80
80
  setFilter(optionsElement.getAttribute("value") || "");
81
81
  };
@@ -84,7 +84,7 @@ function InputSelect(props) {
84
84
  event.target.value = props.mask ? props.mask(value2) : value2;
85
85
  setFilter(value2);
86
86
  if (props.onFilter) props.onFilter(value2);
87
- const optionsElement = document.getElementById("input-options");
87
+ const optionsElement = document.getElementById(`input-${props.name}-options`);
88
88
  if (!optionsElement) return;
89
89
  optionsElement.setAttribute("value", value2);
90
90
  };
@@ -42,7 +42,7 @@ function InputSelect(props) {
42
42
  const onFocus = (event) => {
43
43
  setFocus(true);
44
44
  if (register.onFocus) register.onFocus(event);
45
- const optionsElement = document.getElementById("input-options");
45
+ const optionsElement = document.getElementById(`input-${props.name}-options`);
46
46
  if (!optionsElement) return;
47
47
  setFilter(optionsElement.getAttribute("value") || "");
48
48
  };
@@ -51,7 +51,7 @@ function InputSelect(props) {
51
51
  event.target.value = props.mask ? props.mask(value2) : value2;
52
52
  setFilter(value2);
53
53
  if (props.onFilter) props.onFilter(value2);
54
- const optionsElement = document.getElementById("input-options");
54
+ const optionsElement = document.getElementById(`input-${props.name}-options`);
55
55
  if (!optionsElement) return;
56
56
  optionsElement.setAttribute("value", value2);
57
57
  };
@@ -42,7 +42,7 @@ function InputSelectOption(props) {
42
42
  const target = (0, import_contexts.useTarget)();
43
43
  const [options, setOptions] = (0, import_react.useState)(props.options);
44
44
  (0, import_react.useEffect)(() => {
45
- const optionsElement = document.getElementById("input-options");
45
+ const optionsElement = document.getElementById(`input-${props.name}-options`);
46
46
  if (!optionsElement) return;
47
47
  const observer = new MutationObserver((mutations) => {
48
48
  for (const mutation of mutations) {
@@ -68,11 +68,11 @@ function InputSelectOption(props) {
68
68
  var _a;
69
69
  (_a = props.setValue) == null ? void 0 : _a.call(props, props.name, value);
70
70
  target.close(props.inputRef);
71
- const optionsElement = document.getElementById("input-options");
71
+ const optionsElement = document.getElementById(`input-${props.name}-options`);
72
72
  if (!optionsElement) return;
73
73
  optionsElement.setAttribute("value", "");
74
74
  };
75
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.Container, { id: "input-options", width: props.width, children: import_lodash.default.map(
75
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.Container, { id: `input-${props.name}-options`, width: props.width, children: import_lodash.default.map(
76
76
  options,
77
77
  (data, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
78
78
  "div",
@@ -9,7 +9,7 @@ function InputSelectOption(props) {
9
9
  const target = useTarget();
10
10
  const [options, setOptions] = useState(props.options);
11
11
  useEffect(() => {
12
- const optionsElement = document.getElementById("input-options");
12
+ const optionsElement = document.getElementById(`input-${props.name}-options`);
13
13
  if (!optionsElement) return;
14
14
  const observer = new MutationObserver((mutations) => {
15
15
  for (const mutation of mutations) {
@@ -35,11 +35,11 @@ function InputSelectOption(props) {
35
35
  var _a;
36
36
  (_a = props.setValue) == null ? void 0 : _a.call(props, props.name, value);
37
37
  target.close(props.inputRef);
38
- const optionsElement = document.getElementById("input-options");
38
+ const optionsElement = document.getElementById(`input-${props.name}-options`);
39
39
  if (!optionsElement) return;
40
40
  optionsElement.setAttribute("value", "");
41
41
  };
42
- return /* @__PURE__ */ jsx(Container, { id: "input-options", width: props.width, children: _.map(
42
+ return /* @__PURE__ */ jsx(Container, { id: `input-${props.name}-options`, width: props.width, children: _.map(
43
43
  options,
44
44
  (data, index) => /* @__PURE__ */ jsx(
45
45
  "div",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.145",
3
+ "version": "1.4.146",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",