Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data clear even with keepPreviousData option on useInfiniteQuery #959

Closed
jansedlon opened this issue Sep 3, 2020 · 0 comments · Fixed by #961
Closed

Data clear even with keepPreviousData option on useInfiniteQuery #959

jansedlon opened this issue Sep 3, 2020 · 0 comments · Fixed by #961

Comments

@jansedlon
Copy link

Describe the bug
When using useInfiniteQuery with argument sent to a resolver function, enabled: false and keepPreviousData: true, data are deleted when one of arguments are changed.

To Reproduce
Steps to reproduce the behavior:

  1. Create useInfiniteQuery with some argument that is changing
  2. Set enabled: false and keepPreviousData: true
  3. Fetch some data
  4. Change the argument
  5. Data are gone

Expected behavior
Data should remain

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: firefox
  • Version: 68

Additional context
react-query version: 2.14.1

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 a pull request may close this issue.

1 participant