@gustavo-valsechi/client 1.4.211 → 1.4.213
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/index.js +1 -1
- package/dist/src/components/types/form/index.mjs +1 -1
- 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/package.json +1 -1
|
@@ -95,7 +95,7 @@ function Form(props) {
|
|
|
95
95
|
defaultValues[key] = input.mask ? input.mask(value) : value;
|
|
96
96
|
});
|
|
97
97
|
reset(defaultValues, { keepErrors: false });
|
|
98
|
-
}, [defaultValues]);
|
|
98
|
+
}, [props.defaultValues]);
|
|
99
99
|
const component = (data) => {
|
|
100
100
|
var _a;
|
|
101
101
|
let inputType = "";
|
|
@@ -61,7 +61,7 @@ function Form(props) {
|
|
|
61
61
|
defaultValues[key] = input.mask ? input.mask(value) : value;
|
|
62
62
|
});
|
|
63
63
|
reset(defaultValues, { keepErrors: false });
|
|
64
|
-
}, [defaultValues]);
|
|
64
|
+
}, [props.defaultValues]);
|
|
65
65
|
const component = (data) => {
|
|
66
66
|
var _a;
|
|
67
67
|
let inputType = "";
|
|
@@ -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;
|