@magic-xpa/angular 4.900.0-dev490.19 → 4.900.0-dev490.22

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.
@@ -1888,6 +1888,8 @@ class TaskMagicService {
1888
1888
  this.Records.list[guiRowId].values[controlId] = command.value;
1889
1889
  let c = this.getFormControl(guiRowId.toString(), controlId);
1890
1890
  if (!isNullOrUndefined(c)) {
1891
+ if (command.Bool1)
1892
+ c.reset();
1891
1893
  c.setValue(this.ConvertValFromNative(controlId, command.line, command.value));
1892
1894
  }
1893
1895
  break;
@@ -1921,6 +1923,7 @@ class TaskMagicService {
1921
1923
  ConvertValToNative(controlId, rowId, val) {
1922
1924
  let properties;
1923
1925
  properties = this.Records.list[0].getControlMetadata(controlId);
1926
+ let control = this.getFormControl(rowId.toString(), controlId);
1924
1927
  switch (properties.dataType) {
1925
1928
  case StorageAttribute.BOOLEAN: {
1926
1929
  if (typeof val === 'string') {
@@ -1960,8 +1963,12 @@ class TaskMagicService {
1960
1963
  else
1961
1964
  return val;
1962
1965
  }
1963
- case StorageAttribute.NUMERIC:
1964
- return (val === null) ? 0 : val;
1966
+ case StorageAttribute.NUMERIC: {
1967
+ if (control.dirty && control.touched && val == null)
1968
+ return 0;
1969
+ else
1970
+ return val;
1971
+ }
1965
1972
  default:
1966
1973
  return val;
1967
1974
  }