@tanstack/react-query-devtools 5.0.0-alpha.23 → 5.0.0-alpha.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/build/lib/CachePanel/ActiveQuery.d.ts +1 -0
  2. package/build/lib/CachePanel/ActiveQuery.esm.js +7 -1
  3. package/build/lib/CachePanel/ActiveQuery.esm.js.map +1 -1
  4. package/build/lib/CachePanel/ActiveQuery.js +7 -1
  5. package/build/lib/CachePanel/ActiveQuery.js.map +1 -1
  6. package/build/lib/CachePanel/ActiveQuery.mjs +5 -1
  7. package/build/lib/CachePanel/ActiveQuery.mjs.map +1 -1
  8. package/build/lib/CachePanel/CachePanel.d.ts +1 -0
  9. package/build/lib/CachePanel/Header/QueryStatusCount.d.ts +1 -0
  10. package/build/lib/CachePanel/QueryRow.d.ts +1 -0
  11. package/build/lib/Explorer.d.ts +1 -0
  12. package/build/lib/Logo.d.ts +1 -0
  13. package/build/lib/__tests__/Explorer.test.d.ts +1 -0
  14. package/build/lib/__tests__/devtools.test.d.ts +1 -0
  15. package/build/lib/__tests__/utils.d.ts +1 -0
  16. package/build/lib/devtools.d.ts +1 -0
  17. package/build/lib/index.d.ts +1 -0
  18. package/build/lib/index.prod.d.ts +1 -0
  19. package/build/lib/index.prod.esm.js +7 -1
  20. package/build/lib/index.prod.esm.js.map +1 -1
  21. package/build/lib/index.prod.js +7 -1
  22. package/build/lib/index.prod.js.map +1 -1
  23. package/build/lib/index.prod.mjs +5 -1
  24. package/build/lib/index.prod.mjs.map +1 -1
  25. package/build/lib/noop.d.ts +1 -0
  26. package/build/lib/screenreader.d.ts +1 -0
  27. package/build/lib/styledComponents.d.ts +1 -0
  28. package/build/lib/theme.d.ts +1 -0
  29. package/build/lib/types.d.ts +1 -0
  30. package/build/lib/useLocalStorage.d.ts +1 -0
  31. package/build/lib/useMediaQuery.d.ts +1 -0
  32. package/build/lib/useSubscribeToQueryCache.d.ts +1 -0
  33. package/build/lib/utils.d.ts +1 -0
  34. package/build/umd/index.development.js +5 -1
  35. package/build/umd/index.development.js.map +1 -1
  36. package/package.json +3 -3
  37. package/src/CachePanel/ActiveQuery.tsx +9 -1
  38. package/src/__tests__/devtools.test.tsx +55 -0
@@ -898,7 +898,8 @@ const ActiveQuery = ({
898
898
  });
899
899
  };
900
900
  const restoreQueryAfterLoadingOrError = () => {
901
- activeQuery.fetch(activeQuery.state.fetchMeta.__previousQueryOptions, {
901
+ var _activeQuery$state$fe;
902
+ activeQuery.fetch((_activeQuery$state$fe = activeQuery.state.fetchMeta) == null ? void 0 : _activeQuery$state$fe.__previousQueryOptions, {
902
903
  // Make sure this fetch will cancel the previous one
903
904
  cancelRefetch: true
904
905
  });
@@ -1004,6 +1005,11 @@ const ActiveQuery = ({
1004
1005
  }, "Remove"), ' ', /*#__PURE__*/React.createElement(Button, {
1005
1006
  type: "button",
1006
1007
  onClick: () => {
1008
+ var _activeQuery$state$fe2;
1009
+ // Return early if the query is already restoring
1010
+ if (activeQuery.state.fetchStatus === 'fetching' && typeof ((_activeQuery$state$fe2 = activeQuery.state.fetchMeta) == null ? void 0 : _activeQuery$state$fe2.__previousQueryOptions) === 'undefined') {
1011
+ return;
1012
+ }
1007
1013
  if (activeQuery.state.data === undefined) {
1008
1014
  restoreQueryAfterLoadingOrError();
1009
1015
  } else {