In a staggeredview, setting a conditional visiibility is causing the items to be misaligned

btw, it has a backend query to supabase.

The items have various heights.

The conditions are to do with two page states being set by buttons to filter what is shown in the staggeredview. I have set the Update Type to Rebuild Current Page on both actions.

If I remove the conditional visibility, all the items are shown and they are correctly aligned.

However, when i set it, odd things happen like there's a blank space where the 1st item should be, and the 2nd one would be positioned with top padding.

Does anyone have any suggestions?
Thanks

1
7 replies