textcustomcomparator ag-grid not called for comma separated values

Viewed 24

I am using th ebelow code to make comma separated values in the grid are treated as custom split and searches based on each value. It doesn't even call the custom comparator and doesn't reach the console log code or filter.

{
      headerName: "FirstName",
      field: "FirstName",
      filter: "agTextColumnFilter",
      filterParams: {
        textCustomComparator: function(filter, value, filterText) {
          console.log("came here");
          const filterValues = filterText.split(',');
          return filterValues.some((item) => {
            return value.indexOf(item) >= 0;
          });
        }
      }
    }
0 Answers
Related