pierrejeambrun commented on code in PR #23392:
URL: https://github.com/apache/airflow/pull/23392#discussion_r864282726
##########
airflow/www/static/js/grid/api/useGridData.js:
##########
@@ -67,9 +64,14 @@ const useGridData = () => {
}, {
// only refetch if the refresh switch is on
refetchInterval: isRefreshOn && autoRefreshInterval * 1000,
- initialData,
- placeholderData: emptyData,
});
+
+ // Placeholder object that is not use on refetch, but only
+ // for the initial load.
+ if (!isSuccess) {
Review Comment:
`InitialData` is populating the cache for all key, therefore successive
changes to the filters do not trigger an api call. (Even if the query key
changed). We have to wait for `queryClient.staleTime` to pass, defined in our
config. This is the expected behavior, I linked in the PR description the
related discussion.
It looks like placeholder data is supplied each time you are "refeching" for
another key that is not present in cache -> this induced a flickering with old
data on each refetch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]