@pushwoosh/smart-components-kit 1.21.1 → 1.21.2
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
-
import { useForm } from 'react-hook-form';
|
|
3
|
+
import { useForm, useWatch } from 'react-hook-form';
|
|
4
4
|
import { useParams } from 'react-router-dom';
|
|
5
5
|
import { FieldBox, Modal, ModalBody, ModalHeader, ModalFooter, NativeInput, Select, Button, Banner } from '@pushwoosh/dumb-components';
|
|
6
6
|
import { Horizontal, trackEvent, useAsync, Vertical } from '@pushwoosh/kit-helpers';
|
|
@@ -75,7 +75,7 @@ export function ModalCloningJourney({
|
|
|
75
75
|
value: 'clear'
|
|
76
76
|
}];
|
|
77
77
|
const {
|
|
78
|
-
|
|
78
|
+
control,
|
|
79
79
|
setValue,
|
|
80
80
|
setError,
|
|
81
81
|
clearErrors,
|
|
@@ -96,7 +96,9 @@ export function ModalCloningJourney({
|
|
|
96
96
|
todo: 'keep'
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
|
-
const values =
|
|
99
|
+
const values = useWatch({
|
|
100
|
+
control
|
|
101
|
+
});
|
|
100
102
|
useEffect(() => {
|
|
101
103
|
reset({
|
|
102
104
|
title: lang({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useMemo } from 'react';
|
|
3
|
-
import { Controller, useForm } from 'react-hook-form';
|
|
3
|
+
import { Controller, useForm, useWatch } from 'react-hook-form';
|
|
4
4
|
import { Button, FieldBox, Modal, ModalBody, ModalFooter, ModalHeader, ModalTitle, NativeInput } from '@pushwoosh/dumb-components';
|
|
5
5
|
import { Color } from '@pushwoosh/kit-constants';
|
|
6
6
|
import { Horizontal, useAsync, Vertical } from '@pushwoosh/kit-helpers';
|
|
@@ -52,12 +52,13 @@ export const ResendModal = ({
|
|
|
52
52
|
control,
|
|
53
53
|
clearErrors,
|
|
54
54
|
handleSubmit,
|
|
55
|
-
watch,
|
|
56
55
|
reset
|
|
57
56
|
} = methods;
|
|
58
57
|
const {
|
|
59
58
|
presetSubject
|
|
60
|
-
} =
|
|
59
|
+
} = useWatch({
|
|
60
|
+
control
|
|
61
|
+
});
|
|
61
62
|
useEffect(() => {
|
|
62
63
|
if (!isOpen) {
|
|
63
64
|
reset({
|