I have the following situation: I have a query that's responsible for loading the main data for my page. This query is pretty heavy, so it takes some time, and I want to show a loading spinner for it. The data is then shown in a table and when that table gets updated by the user, I want the query to run again, in order to make sure the frontend is still in sync with the backend. The only difference is that for these runs, I don't want to show the loading spinner, since loading the data can take some time and I want to allow the user to still use the UI without having to wait 10+ seconds after every edit.
My thought was to show the loading spinner only if there's no data yet, so basically !myQuery.data
, but somehow this doesn't work. Is there a way to do this better? Am I missing something?