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.
- package/README.md +1 -0
- package/bundles/fantasy-ngzorro.umd.js +30 -3
- package/bundles/fantasy-ngzorro.umd.js.map +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js.map +1 -1
- package/esm2015/hd-filter/hd-filter.component.js +20 -4
- package/esm5/hd-filter/hd-filter.component.js +31 -4
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +19 -3
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +30 -3
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/hd-filter/hd-filter.component.d.ts +4 -0
- package/package.json +2 -2
|
@@ -3444,7 +3444,7 @@ class HdFilterComponent {
|
|
|
3444
3444
|
* @return {?}
|
|
3445
3445
|
*/
|
|
3446
3446
|
(item, index) => {
|
|
3447
|
-
formGroupList[item.name] = this.fb.control(item.value, []);
|
|
3447
|
+
formGroupList[item.name] = this.fb.control(this.normalizeFilterControlValue(item, item.value), []);
|
|
3448
3448
|
item.show = index < 7;
|
|
3449
3449
|
}));
|
|
3450
3450
|
this.validateFilterForm = this.fb.group(formGroupList);
|
|
@@ -3675,7 +3675,7 @@ class HdFilterComponent {
|
|
|
3675
3675
|
* @return {?}
|
|
3676
3676
|
*/
|
|
3677
3677
|
(item) => {
|
|
3678
|
-
resetValue[item.name] = item.value;
|
|
3678
|
+
resetValue[item.name] = this.normalizeFilterControlValue(item, item.value);
|
|
3679
3679
|
}));
|
|
3680
3680
|
this.validateFilterForm.patchValue(resetValue);
|
|
3681
3681
|
}
|
|
@@ -4229,6 +4229,22 @@ class HdFilterComponent {
|
|
|
4229
4229
|
}));
|
|
4230
4230
|
this.validateFilterForm.patchValue(patch);
|
|
4231
4231
|
}
|
|
4232
|
+
/**
|
|
4233
|
+
* 多选 / 日期范围空态用 [],避免 FormControl 为 null 时 nz-select multiple 不显示 placeholder。
|
|
4234
|
+
* @private
|
|
4235
|
+
* @param {?} filter
|
|
4236
|
+
* @param {?} value
|
|
4237
|
+
* @return {?}
|
|
4238
|
+
*/
|
|
4239
|
+
normalizeFilterControlValue(filter, value) {
|
|
4240
|
+
if (filter &&
|
|
4241
|
+
(filter.type === FilterListType.MultipleSelect ||
|
|
4242
|
+
filter.type === FilterListType.DateRange) &&
|
|
4243
|
+
value == null) {
|
|
4244
|
+
return [];
|
|
4245
|
+
}
|
|
4246
|
+
return value;
|
|
4247
|
+
}
|
|
4232
4248
|
/**
|
|
4233
4249
|
* @private
|
|
4234
4250
|
* @param {?} filter
|
|
@@ -4237,7 +4253,7 @@ class HdFilterComponent {
|
|
|
4237
4253
|
*/
|
|
4238
4254
|
reviveFilterValue(filter, value) {
|
|
4239
4255
|
if (value == null) {
|
|
4240
|
-
return value;
|
|
4256
|
+
return this.normalizeFilterControlValue(filter, value);
|
|
4241
4257
|
}
|
|
4242
4258
|
if (filter.type === FilterListType.DateRange) {
|
|
4243
4259
|
if (Array.isArray(value)) {
|