Skip to content

[Bug][Grid] Virtualized rows fail to render after sorting while scrolled and then returning to top via the scrollbar #3784

Description

@vveesseelliinnaa

Description

With scrollable="virtual" (and fixedScroll not set), sorting the Grid while scrolled down discards the internal row-height/virtualization bookkeeping without immediately reloading the correct visible range. If the user then scrolls to the top using the scrollbar, the first few rows (typically 3-5) render blank. Scrolling down slightly and back up resolves it, since that additional scroll forces the virtualization range to recalculate correctly.

Probably related to #3421

Workaround

Remount the Grid on sort change via key={JSON.stringify(sort)}, combined with the columnsState / onColumnsStateChange controlled API to preserve column reorder/resize state across the remount (see Suggested Response above).

https://codesandbox.io/p/devbox/friendly-rumple-ggczrq?workspaceId=ws_CBqzQqSbGCo1kcCtxpqDvi

Plan

KendoReact Free

Steps To Reproduce

  1. Render a Grid with scrollable="virtual", columnVirtualization, sortable, and a large dataset (e.g. 100,000 rows).
  2. Scroll down a few hundred rows.
  3. Sort any column.
  4. Use the scrollbar to drag back to the top of the Grid.

Screenshots or video

Image

Actual Behavior

The first few rows render blank until the user scrolls down slightly and back up again.

Expected Behavior

All rows in the visible range, including the first rows, should render immediately after returning to the top.

Browser

Chrome

Browser version

latest

OS type

MacOS

OS version

No response

Last working version of the KendoReact package (if regression).

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugItem which indicates that something is not workingC: Grid

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions