@fluxhub/fluxhub-lib 10.0.357 → 10.0.359

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.
@@ -7029,19 +7029,35 @@
7029
7029
  FHComboboxComponent.prototype.setByValue = function (desc_val) {
7030
7030
  this.valDef = desc_val;
7031
7031
  this.selval = "-1";
7032
- console.log('desc_val ', desc_val);
7032
+ console.log(this.myData);
7033
7033
  if ("" + desc_val == "") {
7034
- // console.log('qqq1111');
7034
+ console.log('qqq1111');
7035
7035
  this.descri_val = '';
7036
7036
  this.update_dis();
7037
7037
  return;
7038
7038
  }
7039
- // console.log("qui");
7040
- if (this.myData == null)
7041
- return;
7039
+ console.log("qui ", desc_val);
7040
+ if (this.myData == null) {
7041
+ if (desc_val != null)
7042
+ if (desc_val != '')
7043
+ if (desc_val != '-1') {
7044
+ this.myData = [];
7045
+ this.add_option({ valore: desc_val, descrizione_valore: desc_val });
7046
+ }
7047
+ else
7048
+ return;
7049
+ }
7042
7050
  // console.log("qui1");
7043
- if (this.myData.length == 0 || this.myData[0] == null)
7044
- return;
7051
+ if (this.myData.length == 0 || this.myData[0] == null) {
7052
+ if (desc_val != null)
7053
+ if (desc_val != '')
7054
+ if (desc_val != '-1') {
7055
+ this.myData = [];
7056
+ this.add_option({ valore: desc_val, descrizione_valore: desc_val });
7057
+ }
7058
+ else
7059
+ return;
7060
+ }
7045
7061
  //console.log("qui2");
7046
7062
  for (var j = 0; j < this.myData.length; j++) {
7047
7063
  //console.log(this.myData[j].valore +' '+ desc_val);
@@ -7064,7 +7080,6 @@
7064
7080
  break;
7065
7081
  }
7066
7082
  }
7067
- console.log('b_found ', b_found, desc_val);
7068
7083
  if (!b_found)
7069
7084
  this.add_option({ valore: desc_val, descrizione_valore: desc_val });
7070
7085
  this.selval = desc_val;
@@ -7163,6 +7178,11 @@
7163
7178
  return value;
7164
7179
  };
7165
7180
  FHComboboxComponent.prototype.writeValue = function (value) {
7181
+ if (value == null)
7182
+ return;
7183
+ if (value == undefined)
7184
+ return;
7185
+ console.log('writeValue ', value);
7166
7186
  this.resetValue();
7167
7187
  this.setByValue(value);
7168
7188
  };