Tips on removing loaded images from listview on input change

Hi there,
I have an issue where I'm changing an input to a query that feeds a listview.
The images from the previous dataset are persistent for half a second while the next data source loads the new images. There is no loading state for the images.
And no clear for the listview component in event handlers.

Any tips on how to make this more elegant?
Video of issue here

Hey @jason3w One option could be mapping the query to temp state. That way, you could clear the temp state ->get the new results->and pass the new results to the empty temp state.

Another idea is to leverage isFetching. You could try making the listView length 0 whenever the query is fetching new data:

I also see a request internally to add hoist loading state to the listView-- I can let you know if that feature ships

1 Like