Skip to content

Make isRefetching false when fetching next/previous page in an infinite query - #4465

Merged
TkDodo merged 6 commits into
TanStack:mainfrom
zorzysty:infinite_query_isRefetching_change
Nov 6, 2022
Merged

Make isRefetching false when fetching next/previous page in an infinite query#4465
TkDodo merged 6 commits into
TanStack:mainfrom
zorzysty:infinite_query_isRefetching_change

Conversation

@zorzysty

@zorzysty zorzysty commented Nov 6, 2022

Copy link
Copy Markdown
Contributor

Rationale discussed under #3744

@codesandbox-ci

codesandbox-ci Bot commented Nov 6, 2022

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 57236b2:

Sandbox Source
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-vue-basic Configuration

@TkDodo TkDodo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx. do the existing tests sufficiently cover the different behaviour?

@zorzysty

zorzysty commented Nov 6, 2022

Copy link
Copy Markdown
Contributor Author

thx. do the existing tests sufficiently cover the different behaviour?

I had to update update few tests to cover isRefetching (https://github.com/TanStack/query/pull/4465/files#diff-c873ef3c1942e1a3c9fe1dd336fe8cf6a1f3afaa05a64c80cca60c07320002ee - line 564 is the only one where it should be true)

Comment thread packages/query-core/src/infiniteQueryObserver.ts Outdated
@codecov-commenter

codecov-commenter commented Nov 6, 2022

Copy link
Copy Markdown

Codecov Report

Base: 96.36% // Head: 92.47% // Decreases project coverage by -3.88% ⚠️

Coverage data is based on head (686521b) compared to base (eab6e2c).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4465      +/-   ##
==========================================
- Coverage   96.36%   92.47%   -3.89%     
==========================================
  Files          45       88      +43     
  Lines        2281     3577    +1296     
  Branches      640      927     +287     
==========================================
+ Hits         2198     3308    +1110     
- Misses         80      253     +173     
- Partials        3       16      +13     
Impacted Files Coverage Δ
src/core/infiniteQueryObserver.ts
src/core/mutation.ts
src/react/useQuery.ts
src/core/retryer.ts
src/devtools/tests/utils.tsx
src/devtools/styledComponents.ts
src/react/QueryClientProvider.tsx
src/core/onlineManager.ts
src/core/infiniteQueryBehavior.ts
src/react/useIsFetching.ts
... and 123 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Comment thread packages/query-core/src/infiniteQueryObserver.ts Outdated
Comment thread packages/query-core/src/infiniteQueryObserver.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants