@gustavo-valsechi/client 1.4.195 → 1.4.197
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.
|
@@ -76,9 +76,10 @@ function Form(props) {
|
|
|
76
76
|
if (!props.clearWhen) return;
|
|
77
77
|
reset(void 0, { keepErrors: false });
|
|
78
78
|
}, [props.clearWhen]);
|
|
79
|
+
console.log(props);
|
|
79
80
|
(0, import_react.useEffect)(() => {
|
|
80
81
|
var _a;
|
|
81
|
-
if (!props.defaultValues || !((_a = Object.keys(props.defaultValues || {})) == null ? void 0 : _a.length)) return;
|
|
82
|
+
if (!props.defaultValues || !((_a = Object.keys(props.defaultValues || {})) == null ? void 0 : _a.length)) return reset(void 0, { keepErrors: false });
|
|
82
83
|
const defaultValues = { ...props.defaultValues };
|
|
83
84
|
import_lodash.default.forEach(defaultValues, (value, key) => {
|
|
84
85
|
const input = import_lodash.default.find(props.inputs, (data) => {
|
|
@@ -42,9 +42,10 @@ function Form(props) {
|
|
|
42
42
|
if (!props.clearWhen) return;
|
|
43
43
|
reset(void 0, { keepErrors: false });
|
|
44
44
|
}, [props.clearWhen]);
|
|
45
|
+
console.log(props);
|
|
45
46
|
useEffect(() => {
|
|
46
47
|
var _a;
|
|
47
|
-
if (!props.defaultValues || !((_a = Object.keys(props.defaultValues || {})) == null ? void 0 : _a.length)) return;
|
|
48
|
+
if (!props.defaultValues || !((_a = Object.keys(props.defaultValues || {})) == null ? void 0 : _a.length)) return reset(void 0, { keepErrors: false });
|
|
48
49
|
const defaultValues = { ...props.defaultValues };
|
|
49
50
|
_.forEach(defaultValues, (value, key) => {
|
|
50
51
|
const input = _.find(props.inputs, (data) => {
|
|
@@ -45,7 +45,6 @@ const Container = import_styled_components.default.div`
|
|
|
45
45
|
flex-direction: ${(props) => props.position === "left" ? "row-reverse" : "row"} !important;
|
|
46
46
|
transform: ${(props) => props.toggle ? "translateX(0%)" : "translateX(100%)"};
|
|
47
47
|
transition: ${(props) => props.toggle ? ".0s ease .0s" : ".3s ease .3s"};
|
|
48
|
-
animation: mainAnimation ease 0s;
|
|
49
48
|
|
|
50
49
|
.modal-back {
|
|
51
50
|
width: 100%;
|
|
@@ -164,15 +163,6 @@ const Container = import_styled_components.default.div`
|
|
|
164
163
|
}
|
|
165
164
|
}
|
|
166
165
|
}
|
|
167
|
-
|
|
168
|
-
@keyframes mainAnimation {
|
|
169
|
-
0% {
|
|
170
|
-
transform: translateX(100%);
|
|
171
|
-
}
|
|
172
|
-
100% {
|
|
173
|
-
transform: translateX(0%);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
166
|
|
|
177
167
|
@keyframes backAnimation {
|
|
178
168
|
0% {
|
|
@@ -12,7 +12,6 @@ const Container = styled.div`
|
|
|
12
12
|
flex-direction: ${(props) => props.position === "left" ? "row-reverse" : "row"} !important;
|
|
13
13
|
transform: ${(props) => props.toggle ? "translateX(0%)" : "translateX(100%)"};
|
|
14
14
|
transition: ${(props) => props.toggle ? ".0s ease .0s" : ".3s ease .3s"};
|
|
15
|
-
animation: mainAnimation ease 0s;
|
|
16
15
|
|
|
17
16
|
.modal-back {
|
|
18
17
|
width: 100%;
|
|
@@ -131,15 +130,6 @@ const Container = styled.div`
|
|
|
131
130
|
}
|
|
132
131
|
}
|
|
133
132
|
}
|
|
134
|
-
|
|
135
|
-
@keyframes mainAnimation {
|
|
136
|
-
0% {
|
|
137
|
-
transform: translateX(100%);
|
|
138
|
-
}
|
|
139
|
-
100% {
|
|
140
|
-
transform: translateX(0%);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
133
|
|
|
144
134
|
@keyframes backAnimation {
|
|
145
135
|
0% {
|