@tetacom/ng-components 1.0.89 → 1.0.91

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.
@@ -4904,8 +4904,8 @@ class SelectComponent {
4904
4904
  }
4905
4905
  set options(options) {
4906
4906
  this._options = options;
4907
- if (this.value) {
4908
- this.getSelectedValue(this.getValue(this.value));
4907
+ if (this._internalValue !== null && this._internalValue !== undefined && this.options) {
4908
+ this.getSelectedValue(this._internalValue);
4909
4909
  }
4910
4910
  }
4911
4911
  get options() {
@@ -4950,11 +4950,13 @@ class SelectComponent {
4950
4950
  else {
4951
4951
  this.value = [...this.value, option];
4952
4952
  }
4953
- this.onChange(this.value.map((_) => this.getValue(_)));
4953
+ this._internalValue = this.value.map((_) => this.getValue(_));
4954
+ this.onChange(this._internalValue);
4954
4955
  }
4955
4956
  else {
4956
4957
  this.value = option;
4957
- this.onChange(this.getValue(this.value));
4958
+ this._internalValue = this.getValue(this.value);
4959
+ this.onChange(this._internalValue);
4958
4960
  this.open = false;
4959
4961
  }
4960
4962
  this._cdr.markForCheck();
@@ -4971,7 +4973,8 @@ class SelectComponent {
4971
4973
  removeItemClick(option, event) {
4972
4974
  event.stopPropagation();
4973
4975
  this.removeItem(option);
4974
- this.onChange(this.value.map((_) => this.getValue(_)));
4976
+ this._internalValue = this.value.map((_) => this.getValue(_));
4977
+ this.onChange(this._internalValue);
4975
4978
  }
4976
4979
  removeItem(option) {
4977
4980
  this.value = this.value.filter((_) => _ !== option);
@@ -5018,6 +5021,7 @@ class SelectComponent {
5018
5021
  ngOnInit() {
5019
5022
  }
5020
5023
  writeValue(value) {
5024
+ this._internalValue = value;
5021
5025
  this.getSelectedValue(value);
5022
5026
  this._cdr.detectChanges();
5023
5027
  }
@@ -7913,7 +7917,7 @@ class TableService {
7913
7917
  return !!(obj && obj?.constructor && obj?.call && obj?.apply);
7914
7918
  }
7915
7919
  setColumnAutoWidth(column, table) {
7916
- const cells = table.querySelectorAll(`teta-cell[data-column=${column.name}] .cell-text`);
7920
+ const cells = table.querySelectorAll(`teta-cell[data-column="${column.name}"] .cell-text`);
7917
7921
  let maxWidth = 0;
7918
7922
  cells.forEach((cell) => {
7919
7923
  if (cell.scrollWidth > maxWidth) {