unifyedx-storybook-new 0.1.60 → 0.1.61
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.
|
@@ -75244,7 +75244,7 @@ function SectionRenderer({ item, data: initialData, updateHandler, validationErr
|
|
|
75244
75244
|
console.log(item);
|
|
75245
75245
|
const [section, setSection] = React__default.useState(item);
|
|
75246
75246
|
const [data, setData] = React__default.useState(() => {
|
|
75247
|
-
const sectionData = initialData && initialData[item.key] || {};
|
|
75247
|
+
const sectionData = initialData && initialData[item.key] || (item.type === "datatable" ? [] : {});
|
|
75248
75248
|
console.log("Initial Section data for", item.key, sectionData);
|
|
75249
75249
|
return sectionData;
|
|
75250
75250
|
});
|
|
@@ -76928,11 +76928,11 @@ function DynamicConfig({
|
|
|
76928
76928
|
}
|
|
76929
76929
|
}, [configdata, reload, appid, disableApi]);
|
|
76930
76930
|
const handleSectionChange = (name, sectiondata) => {
|
|
76931
|
+
console.log("Section change:", name, sectiondata);
|
|
76931
76932
|
setData((prev) => {
|
|
76932
|
-
const newData = {
|
|
76933
|
-
|
|
76934
|
-
|
|
76935
|
-
};
|
|
76933
|
+
const newData = JSON.parse(JSON.stringify(prev || {}));
|
|
76934
|
+
newData[name] = sectiondata;
|
|
76935
|
+
console.log("Updated data:", newData);
|
|
76936
76936
|
return newData;
|
|
76937
76937
|
});
|
|
76938
76938
|
setValidationErrors((prevErrors) => {
|