impaktapps-ui-builder 1.0.71-alpha.4 → 1.0.72-flickering.1

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.71-alpha.4",
3
+ "version": "1.0.72-flickering.1",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -14,15 +14,6 @@ const imageUiSchema = {
14
14
  url: "",
15
15
  },
16
16
  style: {
17
- // imageStyle: { width: 300 },
18
-
19
- // containerStyle: {
20
- // display: "flex",
21
- // justifyContent: "center",
22
- // alignItems: "center",
23
- // marginLeft: "32px",
24
- // marginTop: 2,
25
- // },
26
17
  },
27
18
  },
28
19
  };
@@ -543,6 +543,7 @@ export const buildPropertiesSection = function (type: String) {
543
543
  uiSchema.elements = [
544
544
  getInputField("imageUrl", "Image URL"),
545
545
  getInputField("height", "Image Height"),
546
+ emptyBox("imageEmpty", { xs: 0, sm: 0, md: 4, lg: 6 }),
546
547
  ]
547
548
  break;
548
549
  }
@@ -1,4 +1,5 @@
1
1
  import _ from "lodash";
2
+ import cloneDeep from 'lodash';
2
3
  import { handlersProps } from "./interface";
3
4
  export const executeEvents = (params: handlersProps) => {
4
5
  let nextEvent = [];
@@ -188,9 +189,25 @@ function mergeFormdata(handlerResponse: any, componentName: string, eventConfig:
188
189
  }
189
190
  else if (eventConfig.type === "Table" && eventConfig.lazyLoading) {
190
191
  if (handlerResponse && handlerResponse?.data) {
191
- formDataHolder[componentName] = handlerResponse.data?.data
192
- formDataHolder[`${componentName}_RowCount`] = handlerResponse.data?.meta?.totalRowCount
193
- store.setFormdata((pre) => { return { ...pre, ...formDataHolder } });
192
+
193
+ const tableData = Array.isArray(handlerResponse.data?.data)
194
+ ? cloneDeep(handlerResponse.data.data)
195
+ : cloneDeep(handlerResponse.data?.data);
196
+
197
+ const rowCount = handlerResponse.data?.meta?.totalRowCount ?? null;
198
+
199
+ const newFormDataHolder = {
200
+ ...formDataHolder,
201
+ [componentName]: tableData,
202
+ [`${componentName}_RowCount`]: rowCount,
203
+ };
204
+ store.setFormdata((prev) => {
205
+ // we merge prev with newFormDataHolder immutably:
206
+ return { ...prev, ...newFormDataHolder }; // CHANGED: no in-place mutation
207
+ });
208
+ // formDataHolder[componentName] = handlerResponse.data?.data
209
+ // formDataHolder[`${componentName}_RowCount`] = handlerResponse.data?.meta?.totalRowCount
210
+ // store.setFormdata((pre) => { return { ...pre, ...formDataHolder } });
194
211
  }
195
212
  }
196
213
  else {