PrimeNG.TableFilter icon indicating copy to clipboard operation
PrimeNG.TableFilter copied to clipboard

MultiSelect filtering with FilterMatchMode IN

Open garry-mitchell-coats-com opened this issue 2 years ago • 0 comments

Hi, I have noticed a small discrepancy in the way that MultiSelects work with Filtering - there appears to be a difference between unchecking all the items, and using the Clear button.

image

I am using an IN filter for this field:

fieldName: {
  value: null,
  matchMode: FilterMatchMode.IN
},

When selecting one or more items, the filter value is an array of items (ie ["A", "B", "C"], and the filter returns the matching items. When unchecking, this becomes an empty array of items ([]), and the filter returns nothing. When clicking Clear, this becomes null, and the filter returns everything.

Ideally, the last two cases will return the same result - everything.

I've checked the Prime documentation and demos, and they don't appear (as far as I can find) to do anything else different to what I'm doing here - the only difference I guess is their back-end response.