Skip to content

Rows can get stuck in InfiniteList #11172

@choult

Description

@choult

What you were expecting:

Only filtered items to be displayed in InfiniteList.

What happened instead:

We have an InfiniteList component with filters that apply or clear cleanly, with accompanying XHR requests to the backend. There are also a couple of sortable columns.

It is possible to get this list into a state where several rows (the example I finally managed to replicate has 7) remain in place while the list updates below it. These rows remain in place (at the top of the list), and in their fixed order, despite any more updates to the base data (ie. adding/removing filters, changing column sorts etc.)

Steps to reproduce:

In order to recreate this, we do have to go through a series of sorts, filters, clearing filters etc until it happens (ie it's non-deterministic). It really feels like a race condition between the state updating and the render occurring, as if the rows from the previous view were orphaned in the DOM.

I appreciate that this is very vague ☹️

Environment

  • React-admin version: 5.2.2
  • Last version that did not exhibit the issue (if applicable): n/a
  • React version: 19.4.2
  • Browser: All

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