@integry/sdk 4.6.76 → 4.6.78
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/package.json
CHANGED
|
@@ -2039,7 +2039,7 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
|
|
|
2039
2039
|
idKeyPath=${uiField?.id_key_path}
|
|
2040
2040
|
typeKeyPath=${uiField?.type_key_path}
|
|
2041
2041
|
titleKeyPath=${uiField?.title_key_path}
|
|
2042
|
-
|
|
2042
|
+
onChangeCallback=${this.props
|
|
2043
2043
|
.onFieldChangeCallback
|
|
2044
2044
|
? (val: any) => {
|
|
2045
2045
|
if (
|
|
@@ -35,6 +35,7 @@ export type DynamicFieldsProps = {
|
|
|
35
35
|
parentFieldsChanged?: boolean;
|
|
36
36
|
value?: any;
|
|
37
37
|
isDisabled?: boolean;
|
|
38
|
+
onChangeCallback?: (val: any) => void;
|
|
38
39
|
} & StoreType;
|
|
39
40
|
|
|
40
41
|
interface DynamicDataItem {
|
|
@@ -65,10 +66,13 @@ const DynamicTypedFields = (props: DynamicFieldsProps) => {
|
|
|
65
66
|
value,
|
|
66
67
|
onChange,
|
|
67
68
|
isDisabled = false,
|
|
69
|
+
onChangeCallback = () => null,
|
|
68
70
|
} = props;
|
|
69
71
|
const [dynamicItems, setDynamicItems] = useState<DynamicDataItem[]>([]);
|
|
70
72
|
const [loading, setLoading] = useState<boolean>(true);
|
|
71
|
-
const [customFieldsData, setCustomFieldsData] = useState<any>(
|
|
73
|
+
const [customFieldsData, setCustomFieldsData] = useState<any>(
|
|
74
|
+
value && value !== '' && typeof value === 'string' ? JSON.parse(value) : {},
|
|
75
|
+
);
|
|
72
76
|
const [
|
|
73
77
|
isErrorOnLoadingCustomFields,
|
|
74
78
|
setIsErrorOnLoadingCustomFields,
|
|
@@ -161,6 +165,9 @@ const DynamicTypedFields = (props: DynamicFieldsProps) => {
|
|
|
161
165
|
if (onChange) {
|
|
162
166
|
onChange(data);
|
|
163
167
|
}
|
|
168
|
+
if (onChangeCallback) {
|
|
169
|
+
onChangeCallback(JSON.stringify(data));
|
|
170
|
+
}
|
|
164
171
|
};
|
|
165
172
|
|
|
166
173
|
return html`
|