@sphereon/ui-components.ssi-react 0.4.1-unstable.22 → 0.4.1-unstable.25

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.
@@ -32,6 +32,10 @@ const initializeDefaultValues = (schema, currentData = {}) => {
32
32
  : { ...property.default };
33
33
  console.log(` Applied object default for ${key}:`, result[key]);
34
34
  }
35
+ else {
36
+ result[key] = property.default;
37
+ console.log(` Applied default for ${key}:`, result[key]);
38
+ }
35
39
  }
36
40
  else if (key in result) {
37
41
  console.log(` Key ${key} already exists in data:`, result[key]);
@@ -62,8 +66,12 @@ const FormView = (props) => {
62
66
  if (!initialized) {
63
67
  return;
64
68
  }
65
- setFormData(state.data);
66
- void onFormStateChange?.(state);
69
+ const mergedData = {
70
+ ...formData,
71
+ ...state.data
72
+ };
73
+ setFormData(mergedData);
74
+ void onFormStateChange?.({ ...state, data: mergedData });
67
75
  };
68
76
  return (_jsx("div", { style: style, children: _jsx(JsonForms, { schema: schema, uischema: uiSchema, data: formData, renderers: renderers, cells: cells, onChange: onFormStateChanged, validationMode: validationMode, middleware: middleware, ajv: ajv, readonly: readonly, config: config }) }));
69
77
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sphereon/ui-components.ssi-react",
3
3
  "private": false,
4
- "version": "0.4.1-unstable.22+8124148",
4
+ "version": "0.4.1-unstable.25+dbfbb6d",
5
5
  "description": "SSI UI components for React",
6
6
  "repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
7
7
  "author": "Sphereon <dev@sphereon.com>",
@@ -50,7 +50,7 @@
50
50
  "@mui/x-date-pickers": "^6.19.5",
51
51
  "@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.45.94",
52
52
  "@sphereon/ssi-types": "0.34.1-feature.SSISDK.45.94",
53
- "@sphereon/ui-components.core": "0.4.1-unstable.22+8124148",
53
+ "@sphereon/ui-components.core": "0.4.1-unstable.25+dbfbb6d",
54
54
  "@tanstack/react-table": "^8.9.3",
55
55
  "react-json-tree": "^0.18.0",
56
56
  "react-loader-spinner": "5.4.5",
@@ -69,5 +69,5 @@
69
69
  "peerDependencies": {
70
70
  "react": ">= 18"
71
71
  },
72
- "gitHead": "81241485041eae996b37891371895313f52359c4"
72
+ "gitHead": "dbfbb6dd118bb8eed519ac965ee2a5fd2d72569c"
73
73
  }