@integry/sdk 4.5.46 → 4.5.48
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
|
@@ -141,6 +141,9 @@ const ObjectField = (props: ObjectFieldProps) => {
|
|
|
141
141
|
: {}),
|
|
142
142
|
};
|
|
143
143
|
|
|
144
|
+
setObjectHasFields(!!Object.keys(normalizedField.template_fields).length);
|
|
145
|
+
setShowAddMoreOption(!!Object.keys(normalizedField.template_fields).length);
|
|
146
|
+
|
|
144
147
|
// Method to handle field changes for each object in the array
|
|
145
148
|
const handleFieldChange = (
|
|
146
149
|
index: number,
|
|
@@ -160,7 +163,11 @@ const ObjectField = (props: ObjectFieldProps) => {
|
|
|
160
163
|
// Optionally trigger the parent change handler
|
|
161
164
|
if (isArray) {
|
|
162
165
|
if (isFlow && onChangeInFlow) {
|
|
163
|
-
|
|
166
|
+
if (normalizedField.template_fields?.length > 0) {
|
|
167
|
+
onChangeInFlow(JSON.stringify(updatedObjectArray));
|
|
168
|
+
} else {
|
|
169
|
+
onChangeInFlow(value);
|
|
170
|
+
}
|
|
164
171
|
} else {
|
|
165
172
|
onChange(
|
|
166
173
|
fieldId,
|
|
@@ -172,7 +179,15 @@ const ObjectField = (props: ObjectFieldProps) => {
|
|
|
172
179
|
);
|
|
173
180
|
}
|
|
174
181
|
} else if (isFlow && onChangeInFlow) {
|
|
175
|
-
|
|
182
|
+
if (normalizedField.template_fields?.length > 0) {
|
|
183
|
+
onChangeInFlow(
|
|
184
|
+
JSON.stringify({
|
|
185
|
+
[machine_name || '']: value,
|
|
186
|
+
}),
|
|
187
|
+
);
|
|
188
|
+
} else {
|
|
189
|
+
onChangeInFlow(value);
|
|
190
|
+
}
|
|
176
191
|
} else {
|
|
177
192
|
onChange(fieldId, value, dataType, field.is_required, field.id);
|
|
178
193
|
}
|