fantasy-ngzorro 2.1.41 → 2.1.42

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.
@@ -9115,8 +9115,28 @@
9115
9115
  * @return {?}
9116
9116
  */
9117
9117
  function () {
9118
+ var _this = this;
9118
9119
  this.isAllDisplayDataChecked = false;
9119
9120
  this.isIndeterminate = false;
9121
+ // 先显式置 false,避免 nz-checkbox 内部状态与 mapOfCheckedId 不同步(虚拟滚动复用行时常见)
9122
+ Object.keys(this.mapOfCheckList).forEach((/**
9123
+ * @param {?} key
9124
+ * @return {?}
9125
+ */
9126
+ function (key) {
9127
+ _this.mapOfCheckedId[key] = false;
9128
+ }));
9129
+ this.listOfDisplayData.forEach((/**
9130
+ * @param {?} item
9131
+ * @return {?}
9132
+ */
9133
+ function (item) {
9134
+ /** @type {?} */
9135
+ var key = item[_this.selectField];
9136
+ if (key != null) {
9137
+ _this.mapOfCheckedId[key] = false;
9138
+ }
9139
+ }));
9120
9140
  this.mapOfCheckedId = {};
9121
9141
  this.mapOfCheckList = {};
9122
9142
  this.selectEvent.emit([]);
@@ -9136,13 +9156,16 @@
9136
9156
  var _this = this;
9137
9157
  if (event === void 0) { event = false; }
9138
9158
  if (data === void 0) { data = null; }
9139
- if (event && data) {
9140
- !this.mapOfCheckList[data[this.selectField]] &&
9141
- (this.mapOfCheckList[data[this.selectField]] = data);
9142
- }
9143
- else if (!event && data) {
9144
- this.mapOfCheckList[data[this.selectField]] &&
9145
- delete this.mapOfCheckList[data[this.selectField]];
9159
+ if (data) {
9160
+ this.mapOfCheckedId[data[this.selectField]] = event;
9161
+ if (event) {
9162
+ !this.mapOfCheckList[data[this.selectField]] &&
9163
+ (this.mapOfCheckList[data[this.selectField]] = data);
9164
+ }
9165
+ else {
9166
+ this.mapOfCheckList[data[this.selectField]] &&
9167
+ delete this.mapOfCheckList[data[this.selectField]];
9168
+ }
9146
9169
  }
9147
9170
  this.isAllDisplayDataChecked = this.listOfDisplayData.every((/**
9148
9171
  * @param {?} item