jsl-ui 9.19.2 → 9.19.3

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.
@@ -72,9 +72,13 @@ var CheckBoxComponent = /** @class */ (function () {
72
72
  return ((_a = this.currentDom) === null || _a === void 0 ? void 0 : _a.checked) || false;
73
73
  };
74
74
  CheckBoxComponent.prototype.setValue = function (val) {
75
+ var _a;
75
76
  if (this.currentDom != null) {
76
77
  this.currentDom.checked = val;
77
78
  }
79
+ if (this.options.bindTo && this.options.bindMode !== "fromModel" && this.options.property) {
80
+ this.options.bindTo[this.options.property] = ((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toData) ? this.options.converter.toData(val) : val;
81
+ }
78
82
  };
79
83
  CheckBoxComponent.prototype.onCreate = function (node) {
80
84
  this.currentDom = node.dom.querySelector("input");
@@ -250,6 +250,7 @@ var SelectComponent = /** @class */ (function () {
250
250
  };
251
251
  SelectComponent.prototype.setValue = function (value) {
252
252
  var _this = this;
253
+ var _a;
253
254
  if (value != null) {
254
255
  if (this.options.multiple) {
255
256
  this.selected = this.options.data.filter(function (x) { return value.indexOf(x[_this.options.keyColumn]) >= 0; });
@@ -261,6 +262,9 @@ var SelectComponent = /** @class */ (function () {
261
262
  else {
262
263
  this.selected = this.options.multiple ? [] : null;
263
264
  }
265
+ if (this.options.bindTo && this.options.bindMode !== "fromModel" && this.options.property) {
266
+ this.options.bindTo[this.options.property] = ((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toData) ? this.options.converter.toData(value) : value;
267
+ }
264
268
  if (this.renderer != null) {
265
269
  this.renderer.refresh();
266
270
  }