I have a listview queried from supabase displaying a list of images that the user uploads. I have this list set with conditional visibility of Number of List items > 0. For some reason, the visibility will only update on page load, for example if there are already items in the list, then it will be visible, if not, it will not be visible. I cannot figure out how to make this work so that if list items number = 0 and then an item gets added, it will update the visibility, and vice versa for deleting the last remaining image in the list. I have it set to refresh database request after any action and nothing happens aside from adding to list IF it's already visible. Does anyone know how I can do this?
Update conditional visibility based on items in list count from query?
Widgets & Design
I have tried using a toggle boolean state variable to update after every add/remove from list so that when it changes it the page rebuilds. I've tried using a page state variable for the conditional visibility tied to the number of list items but same issue persists since I can't update the page state variable on page load when tying it to queried data since it doesn't load instantly. I've even tried setting an empty list view component of a blank 0 width 0 height container and it doesn't adjust the height of the list view itself. It's still a giant blank area instead of looking like nothing is there. I've also tried a conditional builder. Any ideas please?
Yes
3
2 replies