@pushwoosh/smart-components-kit 1.0.58 → 1.0.59
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.
|
@@ -72,6 +72,7 @@ export function ModalCloningJourney({
|
|
|
72
72
|
watch,
|
|
73
73
|
setValue,
|
|
74
74
|
setError,
|
|
75
|
+
clearErrors,
|
|
75
76
|
handleSubmit,
|
|
76
77
|
formState: {
|
|
77
78
|
errors
|
|
@@ -144,6 +145,9 @@ export function ModalCloningJourney({
|
|
|
144
145
|
});
|
|
145
146
|
} else {
|
|
146
147
|
setValue('destination', newValue.map(item => item.value));
|
|
148
|
+
if (newValue.length > 0) {
|
|
149
|
+
clearErrors('destination');
|
|
150
|
+
}
|
|
147
151
|
}
|
|
148
152
|
};
|
|
149
153
|
const isCloningToAnotherProject = applicationsOptions.length > 0 && (values.destination.length === 1 && values.destination[0] !== applicationCode || values.destination.length > 1);
|
|
@@ -167,7 +171,12 @@ export function ModalCloningJourney({
|
|
|
167
171
|
placeholder: "ex. Onboarding",
|
|
168
172
|
name: "title",
|
|
169
173
|
value: values.title,
|
|
170
|
-
onChange: e =>
|
|
174
|
+
onChange: e => {
|
|
175
|
+
setValue('title', e.target.value);
|
|
176
|
+
if (e.target.value) {
|
|
177
|
+
clearErrors('title');
|
|
178
|
+
}
|
|
179
|
+
}
|
|
171
180
|
})), React.createElement(FieldBox, {
|
|
172
181
|
title: "Destination projects",
|
|
173
182
|
error: (_errors$destination = errors.destination) === null || _errors$destination === void 0 ? void 0 : _errors$destination.message,
|
package/package.json
CHANGED