tnx-shared 5.3.256 → 5.3.257

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.
@@ -32939,12 +32939,14 @@
32939
32939
  && this.control.autoDisplayFirst) {
32940
32940
  newValue = [this.dataSourceInternal[0].value];
32941
32941
  }
32942
- this._value = newValue;
32943
- if (oldValue.length != this._value.length) {
32944
- this.fireChangedEvent();
32945
- }
32946
- else if (this._value != oldValue) {
32947
- this.adjustValue2WayBinding();
32942
+ if (this._value !== undefined) {
32943
+ this._value = newValue;
32944
+ if (oldValue.length != this._value.length) {
32945
+ this.fireChangedEvent();
32946
+ }
32947
+ else if (!this._commonService.isSameArray(oldValue, this._value)) {
32948
+ this.adjustValue2WayBinding();
32949
+ }
32948
32950
  }
32949
32951
  }
32950
32952
  else {
@@ -32954,14 +32956,16 @@
32954
32956
  && this.control.autoDisplayFirst) {
32955
32957
  this._value = this.dataSourceInternal[0].value;
32956
32958
  }
32957
- // Lưu ý if dưới không được đổi thành oldValue != this._value
32958
- // giá trị của this._value sẽ được correcting trên (id => object) nên so sánh sẽ khác nhau
32959
- if ((oldValue != null && this._value == null)
32960
- || (oldValue == null && this._value != null)) {
32961
- this.fireChangedEvent();
32962
- }
32963
- else if (this._value != oldValue) {
32964
- this.adjustValue2WayBinding();
32959
+ if (this._value !== undefined) {
32960
+ // Lưu ý if dưới không được đổi thành oldValue != this._value
32961
+ // giá trị của this._value sẽ được correcting ở trên (id => object) nên so sánh sẽ khác nhau
32962
+ if ((oldValue != null && this._value == null)
32963
+ || (oldValue == null && this._value != null)) {
32964
+ this.fireChangedEvent();
32965
+ }
32966
+ else if (this._value != oldValue) {
32967
+ this.adjustValue2WayBinding();
32968
+ }
32965
32969
  }
32966
32970
  }
32967
32971
  this.checkReady();