equalsStringSensitive built-in filter function not recognized by React Table v8.8.4

95 views Asked by At

I'm using react-table v8.8.4 with the filtering functionality enabled like this:

const table = useReactTable({
        columns,
        data,
        enableColumnFilters: true,
        enableFilters: true,
        getCoreRowModel: getCoreRowModel(),
        getFilteredRowModel: getFilteredRowModel(),            
        state: {
            columnFilters,
            columnVisibility,
            globalFilter,
            sorting               
        },
        enableGlobalFilter: true,
        globalFilterFn: 'includesString',
        onSortingChange: setSorting,    
        enableSorting: true,
        enableSortingRemoval: false,     

});

At state.columnFilters I'm passing an array with the following structure:

[{
    id: 'Severity',
    value: ...
}]

The column is defined like this:

{
     accessorKey: 'Severity',
     enableColumnFilter: true,
     enableSorting: true,
     filterFn: 'equals'
     header: 'Severity',
     sortDescFirst: true,
     sortingFn: (...): number => {...},
     cell: (props: any) => {...}
}

This is working fine with all the values passed to state.ColumnFilters, and the built-in filter functions 'equals' and 'equalsString'. If I use the function 'equalsStringSensitive' I get the warning Could not find a valid 'column.filterFn' for column with the ID: Severity

With the filter functions 'equals' and 'equalsString' I meet the requirements, however, I would like to know if I might be missing something to make the 'equalsStringSensitive' function to work that should be used with 'equals' and 'equalsString' as well.

Thanks!

0

There are 0 answers