@gustavo-valsechi/client 1.4.212 → 1.4.214
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/src/components/types/form/types/select/index.js +1 -3
- package/dist/src/components/types/form/types/select/index.mjs +1 -3
- package/dist/src/components/types/form/types/select/options/index.js +1 -0
- package/dist/src/components/types/form/types/select/options/index.mjs +1 -0
- package/dist/src/contexts/target/index.js +1 -0
- package/dist/src/contexts/target/index.mjs +1 -0
- package/package.json +1 -1
|
@@ -53,10 +53,8 @@ function InputSelect(props) {
|
|
|
53
53
|
const value = ((_b = props.options) == null ? void 0 : _b[inputValue]) || /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "input-label-value-placeholder", children: "selecione" });
|
|
54
54
|
(0, import_react.useEffect)(() => {
|
|
55
55
|
var _a2;
|
|
56
|
-
console.log(inputRef == null ? void 0 : inputRef.current);
|
|
57
|
-
console.log(containerRef == null ? void 0 : containerRef.current);
|
|
58
|
-
console.log(props.options);
|
|
59
56
|
if (!(inputRef == null ? void 0 : inputRef.current) || !(containerRef == null ? void 0 : containerRef.current) || !Object.keys(props.options || {}).length) return;
|
|
57
|
+
console.log("OPTIONS");
|
|
60
58
|
target.add({
|
|
61
59
|
ref: inputRef,
|
|
62
60
|
component: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -20,10 +20,8 @@ function InputSelect(props) {
|
|
|
20
20
|
const value = ((_b = props.options) == null ? void 0 : _b[inputValue]) || /* @__PURE__ */ jsx("div", { className: "input-label-value-placeholder", children: "selecione" });
|
|
21
21
|
useEffect(() => {
|
|
22
22
|
var _a2;
|
|
23
|
-
console.log(inputRef == null ? void 0 : inputRef.current);
|
|
24
|
-
console.log(containerRef == null ? void 0 : containerRef.current);
|
|
25
|
-
console.log(props.options);
|
|
26
23
|
if (!(inputRef == null ? void 0 : inputRef.current) || !(containerRef == null ? void 0 : containerRef.current) || !Object.keys(props.options || {}).length) return;
|
|
24
|
+
console.log("OPTIONS");
|
|
27
25
|
target.add({
|
|
28
26
|
ref: inputRef,
|
|
29
27
|
component: /* @__PURE__ */ jsx(
|
|
@@ -42,6 +42,7 @@ var import_lodash = __toESM(require("lodash"));
|
|
|
42
42
|
function InputSelectOption(props) {
|
|
43
43
|
const target = (0, import_contexts.useTarget)();
|
|
44
44
|
const [options, setOptions] = (0, import_react.useState)(props.options);
|
|
45
|
+
console.log(options);
|
|
45
46
|
(0, import_react.useEffect)(() => {
|
|
46
47
|
const optionsElement = document.getElementById(`input-${props.name}-options`);
|
|
47
48
|
if (!optionsElement) return;
|
|
@@ -9,6 +9,7 @@ import _ from "lodash";
|
|
|
9
9
|
function InputSelectOption(props) {
|
|
10
10
|
const target = useTarget();
|
|
11
11
|
const [options, setOptions] = useState(props.options);
|
|
12
|
+
console.log(options);
|
|
12
13
|
useEffect(() => {
|
|
13
14
|
const optionsElement = document.getElementById(`input-${props.name}-options`);
|
|
14
15
|
if (!optionsElement) return;
|
|
@@ -154,6 +154,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
154
154
|
};
|
|
155
155
|
const add = (target) => {
|
|
156
156
|
const exists = import_lodash.default.find(memory, (data) => data.ref.current === target.ref.current);
|
|
157
|
+
console.log(exists);
|
|
157
158
|
if (exists) return;
|
|
158
159
|
memory.push(target);
|
|
159
160
|
setTargets(memory);
|
|
@@ -120,6 +120,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
120
120
|
};
|
|
121
121
|
const add = (target) => {
|
|
122
122
|
const exists = _.find(memory, (data) => data.ref.current === target.ref.current);
|
|
123
|
+
console.log(exists);
|
|
123
124
|
if (exists) return;
|
|
124
125
|
memory.push(target);
|
|
125
126
|
setTargets(memory);
|