onSearch in useSelect is not working with nested filter
I'm using supabase with antd and I cannot make it work to search inside !inner I get this error:
{
"code": "PGRST100",
"details": "unexpected "t" expecting "not" or operator (eq, gt, ...)",
"hint": null,
"message": ""failed to parse logic tree ((name.ilike.%ds%,product_item.title.ilike.%ds%))" (line 1, column 33)"
}
Payload:
select: ,product_item!inner(title)
account: eq.436ab251-7872-4ae3-a7fb-63ab0cd8291e
or: (name.ilike.%ds%,product_item.title.ilike.%ds%)
useSelect<{
id: number | string;
name: string;
description?: string;
phases?: IPhase[];
account: string;
product_item: any;
}>({
resource: "subscription_products",
meta: {
select: ", product_item!inner(title)",
},
filters: [
{
field: "account",
value: currentTeam?.account_id,
operator: "eq",
},
],
onSearch: (value) => [
{
operator: "or",
value: [
{
field: "name",
operator: "contains",
value: value,
},
{
field: "product_item.title",
operator: "contains",
value: value,
},
],
},
],
});
{
"code": "PGRST100",
"details": "unexpected "t" expecting "not" or operator (eq, gt, ...)",
"hint": null,
"message": ""failed to parse logic tree ((name.ilike.%ds%,product_item.title.ilike.%ds%))" (line 1, column 33)"
}
Payload:
select: ,product_item!inner(title)
account: eq.436ab251-7872-4ae3-a7fb-63ab0cd8291e
or: (name.ilike.%ds%,product_item.title.ilike.%ds%)
useSelect<{
id: number | string;
name: string;
description?: string;
phases?: IPhase[];
account: string;
product_item: any;
}>({
resource: "subscription_products",
meta: {
select: ", product_item!inner(title)",
},
filters: [
{
field: "account",
value: currentTeam?.account_id,
operator: "eq",
},
],
onSearch: (value) => [
{
operator: "or",
value: [
{
field: "name",
operator: "contains",
value: value,
},
{
field: "product_item.title",
operator: "contains",
value: value,
},
],
},
],
});
