[BUG] eq
Filter Operation Used Instead of Custom filterOperator in Supabase Data Provider
#6273
Labels
bug
Something isn't working
Describe the bug
I have built an application using Refine and the Supabase data provider. When I attempt to perform a search operation, the filter operation is always set to eq (equals) in the request sent to the data provider and the router, despite specifying a different filterOperator in the column's meta property.
Steps To Reproduce
Below is the column definition I am using:
{ accessorKey: "name", header: ({ column }) => { return <DataTableColumnHeader column={column} title="Name" />; }, cell: ({ row }) => { return ( <div className="flex space-x-2"> <span className="max-w-[500px] truncate font-medium"> {row.getValue("name")} </span> </div> ); }, meta: { filterOperator: "contains", // Intended to use "contains" operation } }
Here's how I'm setting the filter value via an input field:
<Input placeholder="Filter students..." value={(table.getColumn("name")?.getFilterValue() as string) ?? ""} onChange={(event) => table.getColumn("name")?.setFilterValue(event.target.value) } className="h-8 w-[150px] lg:w-[250px]" />
Expected behavior
The search operation should use the contains filter operator as specified in the column's meta property.
Actual Behavior:
The filter operation is always sent as eq (equals) to the Supabase data provider and the router, ignoring the specified filterOperator.
Packages
"react": "^18.3.1",
"@refinedev/core": "^4.54.0",
"@refinedev/react-table": "^5.6.13",
"@refinedev/supabase": "^5.9.3",
Additional Context
This issue limits the ability to perform more flexible search operations, such as partial matching using contains, which is crucial for the search functionality in my application.
The text was updated successfully, but these errors were encountered: