@sd-angular/core 19.0.17 → 19.0.18

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.
@@ -3077,19 +3077,20 @@ const matchesColumnFilter = (data, columns = [], rawColumnFilter = {}) => {
3077
3077
  }
3078
3078
  else if (type === 'values' || type === 'lazy-values') {
3079
3079
  const columnType = column;
3080
- const isMultiple = columnType.option.selection === 'MULTIPLE';
3081
- if (isMultiple && Array.isArray(rawColVal)) {
3082
- const columnValues = rawColVal.map((i) => (Utilities.getNestedValue(i, columnType.option.valueField) ?? '').toString().trim().toLowerCase()) ??
3083
- [];
3084
- const filterValues = rawColumnFilter[field]?.map((v) => (v ?? '').toString().trim().toLowerCase());
3085
- if (filterValues?.length && filterValues.every(fv => !columnValues.includes(fv))) {
3086
- return false;
3087
- }
3088
- }
3089
- else {
3090
- if (columnValue !== filterValue) {
3091
- return false;
3092
- }
3080
+ // why: chọn nhánh theo HÌNH DẠNG GIÁ TRỊ, không theo `option.selection`. Inline filter dropdown
3081
+ // multiple luôn phát ra mảng, còn dữ liệu hàng thường là scalar; trước đây nhánh lại chọn theo
3082
+ // array-ness của DỮ LIỆU HÀNG nên scalar row rơi xuống so sánh `===` với `['A','B'].toString()`
3083
+ // = 'a,b' và không bao giờ khớp (chọn 1 giá trị thì vô tình đúng, chọn từ 2 là mất hết dòng).
3084
+ const rawFilterValue = rawColumnFilter[field];
3085
+ const filterValues = (Array.isArray(rawFilterValue) ? rawFilterValue : [rawFilterValue])
3086
+ .map((v) => (v ?? '').toString().trim().toLowerCase())
3087
+ .filter(v => !!v);
3088
+ const columnValues = Array.isArray(rawColVal)
3089
+ ? rawColVal.map((i) => (Utilities.getNestedValue(i, columnType.option.valueField) ?? '').toString().trim().toLowerCase())
3090
+ : [columnValue];
3091
+ // why: nhiều giá trị = OR, khớp đúng operator `IN` mà SdConvertToPagingReq gửi cho server.
3092
+ if (filterValues.length && !filterValues.some(fv => columnValues.includes(fv))) {
3093
+ return false;
3093
3094
  }
3094
3095
  }
3095
3096
  else if (type === 'number') {