Skip to content

isLoading is not changing to true when placeholderData: keepPreviousData is set #9431

@nodirbekprogrammer

Description

@nodirbekprogrammer

Describe the bug

This is happening with MUI DataGrid pagination. If I set isFetching for the loading state of the table, as shown in the docs, it keeps loading even when I go back, even if the data is already in the cache, which is very annoying.

Your minimal, reproducible example

I'm not lying

Steps to reproduce

Even with placeholderData: keepPreviousData set, isLoading should work as usual.

Expected behavior

I want to load table only when fetching fresh data.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

mac, chrome

Tanstack Query adapter

react-query

TanStack Query version

5.72.0

TypeScript version

5.8.2

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions