Hi! I’m trying to filter using the supabase backend filters. I’ve had good luck using multiple layers of filters but am running into an issue and wondering if it’s a bug.
I have a variable that has school grade levels in it, and I’m using a multi-select drop down for users to be able to filter down to see only schools with relevant grade levels. I have tried three different ways of formatting the variable field to get it to work and I have the prob with all three approaches.
- As text field with KG:01:02:03:04:05 (for an elementary school in the US, for example)
- As a text field with KG, 01, 02, 03, 04, 05.
- As a tsquery field in supabase where it’s formatted as ‘kg’ | ‘01’ | ‘02’ | ‘03’ | ‘04’ | ‘05’ .
The idea is that when families select “KG” and “01” from the dropdown, the data is filtered to show only schools with those grade levels. The filter seems to be identifying the correct value, but the data set is ‘empty’ when I try to run the filter. When I test it, I get the following error:
stack: “TypeError: e.replaceAll is not a function at wt (https://cdn.weweb.io/components/f9ef41c3-1c53-4857-855b-f2f6a40b7186/29660e1c-dd44-491c-8053-f233b75e9ec0/dist/manager.js:1:228487) at https://cdn.weweb.io/components/f9ef41c3-1c53-4857-855b-f2f6a40b7186/29660e1c-dd44-491c-8053-f233b75e9ec0/dist/manager.js:1:227917 at https://cdn.weweb.io/components/f9ef41c3-1c53-4857-855b-f2f6a40b7186/29660e1c-dd44-491c-8053-f233b75e9ec0/dist/manager.js:1:228379 at Array.map () at yt (https://cdn.weweb.io/components/f9ef41c3-1c53-4857-855b-f2f6a40b7186/29660e1c-dd44-491c-8053-f233b75e9ec0/dist/manager.js:1:227537) at https://cdn.weweb.io/components/f9ef41c3-1c53-4857-855b-f2f6a40b7186/29660e1c-dd44-491c-8053-f233b75e9ec0/dist/manager.js:1:227552 at Array.map () at yt (https://cdn.weweb.io/components/f9ef41c3-1c53-4857-855b-f2f6a40b7186/29660e1c-dd44-491c-8053-f233b75e9ec0/dist/manager.js:1:227537) at Object._fetchCollection (https://cdn.weweb.io/components/f9ef41c3-1c53-4857-855b-f2f6a40b7186/29660e1c-dd44-491c-8053-f233b75e9ec0/dist/manager.js:1:229241) at Object._fetchCollection (https://editor-cdn.weweb.io/public/js/index.eab04a57.js:1:438493)”
message: “e.replaceAll is not a function”
Any insights into what is going on and how to resolve it would be greatly appreciated!