@eqproject/eqp-dynamic-module 2.10.39 → 2.10.40

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.
@@ -6351,11 +6351,33 @@ class DynamicModuleFieldFixComponent {
6351
6351
  return;
6352
6352
  }
6353
6353
  if (this.field.FieldType == FieldTypeEnum['Campo di testo']) {
6354
- this.record[this.field.Name] = value[0];
6354
+ var valueToPut = null;
6355
+ if (value == null) {
6356
+ valueToPut = null;
6357
+ }
6358
+ else if (Array.isArray(value[0])) {
6359
+ valueToPut = value[0][0];
6360
+ }
6361
+ else {
6362
+ valueToPut = value[0];
6363
+ }
6364
+ console.log("VALUETOPUT campoditesto", value, valueToPut);
6365
+ this.record[this.field.Name] = valueToPut;
6355
6366
  }
6356
6367
  if (this.field.FieldType == FieldTypeEnum['Elenco generico']) {
6357
6368
  GlobalService.debugLog("onSelectedValue FROM DBGETTER ELENCO GENERICO", value);
6358
- this.record[this.field.Name] = value != null ? value[0] : [];
6369
+ var valueToPut = null;
6370
+ if (value == null) {
6371
+ valueToPut = [];
6372
+ }
6373
+ else if (Array.isArray(value[0])) {
6374
+ valueToPut = value[0][0];
6375
+ }
6376
+ else {
6377
+ valueToPut = value[0];
6378
+ }
6379
+ console.log("VALUETOPUT elencogenerico", value, valueToPut);
6380
+ this.record[this.field.Name] = valueToPut;
6359
6381
  this.DBGetterFieldsLoaded = false;
6360
6382
  setTimeout(() => { this.DBGetterFieldsLoaded = true; }, 1000);
6361
6383
  }