@livinglogic/livingapi 0.14.0 → 0.14.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": "@livinglogic/livingapi",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "Javascript version of the LivingAPI classes of LivingApps",
5
5
  "repository": {
6
6
  "type": "git",
package/src/livingapi.js CHANGED
@@ -1026,7 +1026,8 @@ export class Field extends Base
1026
1026
 
1027
1027
  if (ul4._ne(oldvalue, change.value))
1028
1028
  {
1029
- this.record.values.set(this.control.identifier, change.value);
1029
+ if (this.record_values !== null)
1030
+ this.record._values.set(this.control.identifier, change.value);
1030
1031
  this._value = change.value;
1031
1032
  this._dirty = true;
1032
1033
  }
@@ -1215,7 +1216,7 @@ export class Field extends Base
1215
1216
 
1216
1217
  _set_dom_value(value)
1217
1218
  {
1218
- this._dom_control.value = value;
1219
+ this._dom_control.value = value !== null ? value : "";
1219
1220
  }
1220
1221
 
1221
1222
  get visible()
@@ -1415,7 +1416,7 @@ export class IntField extends Field
1415
1416
 
1416
1417
  _set_dom_value(value)
1417
1418
  {
1418
- super._set_dom_value(value + "");
1419
+ super._set_dom_value(value !== null ? value + "" : "");
1419
1420
  }
1420
1421
 
1421
1422
  value_as_text(maxlevel=3)
@@ -1600,6 +1601,8 @@ export class NumberField extends Field
1600
1601
  if (this.control.precision !== null)
1601
1602
  value = value.toFixed(this.control.precision);
1602
1603
  }
1604
+ else if (value === null)
1605
+ value = "";
1603
1606
  value += "";
1604
1607
  if (this.globals.lang == "de" && this.control.precision === null)
1605
1608
  value = value.replace(".", ",");
@@ -2286,6 +2289,8 @@ export class DateFieldBase extends Field
2286
2289
  {
2287
2290
  if (value !== null)
2288
2291
  value = ul4._format(value, this.control.formatstring(), this.globals.lang);
2292
+ else
2293
+ value = "";
2289
2294
  super._set_dom_value(value);
2290
2295
  }
2291
2296
  };