The first row in the grid disappears after filtering or sorting (data from a Supabase view).

Hi, I’m new to WeWeb and I have the following problem:
I’m fetching data from a view in Supabase.
I’m connecting to the database using Supabese (from WeWeb) plugin, and the data are in a collection.
After using the filter, the filtered data is displayed with the first row invisible.
I’m also filtering data from a second table (authors).
It’s not a view, but a regular table, and the problem doesn’t seem to occur in the second table.
A similar problem occurs when sorting a column.
Does anyone know what could be the cause?

Link to the page where the problem occurs



1 Like

+1 on this issue seen many times

Hi Marius :waving_hand:

I took a look at the link you shared and indeed whenever you make a search in the Datagrid filter the first row is not displayed.

Couple of questions we need to figure out:
1- Is that row supposed to have data and is not being displayed? Or is just a padding/margin error where a blank spacing is being created?
2- Could this have something to do with the way your view is being created in supabase? Maybe a specific rule or filter that is being applied before it arrives in WeWeb?

In the meantime I will ask our tech team to see if they are aware of a bug when using Datagrid filters + Supabase Views.

Encountered this before too..

It seems to have resolved itself, might be related to the “Unique Row Id” value or one of your columns doesnt have a key defined

I have noticed that after changing the Display option from ‘block’ to ‘inline-block’ in the Display section of the grid settings, the problem no longer occurs.

This is what it looks like after changing the settings:

ad 1. Yes, there should be a row with the data displayed. This is evidenced by the number of filtered records in the footer.

ad 2. In my opinion, no. I haven’t added any custom rules or filters.

Apart from that:
https://community.weweb.io/t/the-first-row-in-the-grid-disappears-after-filtering-or-sorting-data-from-a-supabase-view/19153/5?u=mariuszm

Hello, in most cases these issues are caused by IDs there are not unique, leading zeroes etc. Please check your data, ensure each object has a unique ID and bind that accordingly in your Data grid settings.

The IDs were rather good, and changing the settings resolves the issue.
Thank you for your help.

https://community.weweb.io/t/the-first-row-in-the-grid-disappears-after-filtering-or-sorting-data-from-a-supabase-view/19153/5?u=mariuszm