fantasy-ngzorro 2.2.31 → 2.2.32

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.
@@ -3981,7 +3981,7 @@ var HdFilterComponent = /** @class */ (function () {
3981
3981
  * @return {?}
3982
3982
  */
3983
3983
  function (item, index) {
3984
- formGroupList[item.name] = _this.fb.control(item.value, []);
3984
+ formGroupList[item.name] = _this.fb.control(_this.normalizeFilterControlValue(item, item.value), []);
3985
3985
  item.show = index < 7;
3986
3986
  }));
3987
3987
  this.validateFilterForm = this.fb.group(formGroupList);
@@ -4265,6 +4265,7 @@ var HdFilterComponent = /** @class */ (function () {
4265
4265
  * @return {?}
4266
4266
  */
4267
4267
  function () {
4268
+ var _this = this;
4268
4269
  /** @type {?} */
4269
4270
  var resetValue = {};
4270
4271
  this.filterList.forEach((/**
@@ -4272,7 +4273,7 @@ var HdFilterComponent = /** @class */ (function () {
4272
4273
  * @return {?}
4273
4274
  */
4274
4275
  function (item) {
4275
- resetValue[item.name] = item.value;
4276
+ resetValue[item.name] = _this.normalizeFilterControlValue(item, item.value);
4276
4277
  }));
4277
4278
  this.validateFilterForm.patchValue(resetValue);
4278
4279
  };
@@ -4938,6 +4939,32 @@ var HdFilterComponent = /** @class */ (function () {
4938
4939
  }));
4939
4940
  this.validateFilterForm.patchValue(patch);
4940
4941
  };
4942
+ /**
4943
+ * 多选 / 日期范围空态用 [],避免 FormControl 为 null 时 nz-select multiple 不显示 placeholder。
4944
+ */
4945
+ /**
4946
+ * 多选 / 日期范围空态用 [],避免 FormControl 为 null 时 nz-select multiple 不显示 placeholder。
4947
+ * @private
4948
+ * @param {?} filter
4949
+ * @param {?} value
4950
+ * @return {?}
4951
+ */
4952
+ HdFilterComponent.prototype.normalizeFilterControlValue = /**
4953
+ * 多选 / 日期范围空态用 [],避免 FormControl 为 null 时 nz-select multiple 不显示 placeholder。
4954
+ * @private
4955
+ * @param {?} filter
4956
+ * @param {?} value
4957
+ * @return {?}
4958
+ */
4959
+ function (filter, value) {
4960
+ if (filter &&
4961
+ (filter.type === FilterListType.MultipleSelect ||
4962
+ filter.type === FilterListType.DateRange) &&
4963
+ value == null) {
4964
+ return [];
4965
+ }
4966
+ return value;
4967
+ };
4941
4968
  /**
4942
4969
  * @private
4943
4970
  * @param {?} filter
@@ -4953,7 +4980,7 @@ var HdFilterComponent = /** @class */ (function () {
4953
4980
  function (filter, value) {
4954
4981
  var _this = this;
4955
4982
  if (value == null) {
4956
- return value;
4983
+ return this.normalizeFilterControlValue(filter, value);
4957
4984
  }
4958
4985
  if (filter.type === FilterListType.DateRange) {
4959
4986
  if (Array.isArray(value)) {