@evoke-platform/ui-components 1.4.0-testing.17 → 1.4.0-testing.19

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.
@@ -246,14 +246,14 @@ export function parseMongoDB(mongoQuery) {
246
246
  return {
247
247
  field: key,
248
248
  operator: 'in',
249
- value: (value.$in || []).join(','),
249
+ value: value.$in ?? [],
250
250
  };
251
251
  }
252
252
  else if ('$nin' in value) {
253
253
  return {
254
254
  field: key,
255
255
  operator: 'notIn',
256
- value: (value.$nin || []).join(','),
256
+ value: value.$nin ?? [],
257
257
  };
258
258
  }
259
259
  else {
@@ -71,7 +71,7 @@ export class ObjectComponent extends ReactComponent {
71
71
  }
72
72
  this.updatedCriteria = updateCriteriaInputs(this.criteria ?? {}, data, this.component.user);
73
73
  if (this.visible) {
74
- this.attachReact(this.element);
74
+ this.attach(this.element);
75
75
  }
76
76
  });
77
77
  }
@@ -115,7 +115,7 @@ export class ObjectComponent extends ReactComponent {
115
115
  }
116
116
  this.updatedDefaultValueCriteria = updateCriteriaInputs(this.defaultValueCriteria ?? {}, data, this.component.user);
117
117
  if (this.visible) {
118
- this.attachReact(this.element);
118
+ this.attach(this.element);
119
119
  }
120
120
  });
121
121
  }
@@ -158,7 +158,6 @@ export class ObjectComponent extends ReactComponent {
158
158
  delete this.errorDetails['api-error'];
159
159
  }
160
160
  this.attach(this.element);
161
- this.attachReact(this.element);
162
161
  });
163
162
  if (this.component.defaultValue) {
164
163
  this.expandInstance();
@@ -216,11 +215,16 @@ export class ObjectComponent extends ReactComponent {
216
215
  if (!root) {
217
216
  root = element;
218
217
  }
218
+ let updatedValue;
219
+ if (this.shouldSetValue)
220
+ updatedValue = this.dataForSetting;
221
+ else
222
+ updatedValue = this.dataValue;
219
223
  const updatedComponent = {
220
224
  ...this.component,
221
225
  instance: {
222
226
  ...this.component.instance,
223
- [this.component.key]: isEmpty(this.dataValue) ? null : this.dataValue,
227
+ [this.component.key]: isEmpty(updatedValue) || isNil(updatedValue) || updatedValue.length === 0 ? null : updatedValue,
224
228
  },
225
229
  defaultValueCriteria: this.updatedDefaultValueCriteria,
226
230
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evoke-platform/ui-components",
3
- "version": "1.4.0-testing.17",
3
+ "version": "1.4.0-testing.19",
4
4
  "description": "",
5
5
  "main": "dist/published/index.js",
6
6
  "module": "dist/published/index.js",