Skip to content

[Bug]: Overflow manager stale state after item reorder (via React) #36068

@skippone

Description

@skippone

Component

Overflow

Package version

9.7.1

React version

18.2.0

Environment

System:
    OS: Linux 6.8 Ubuntu 20.04.6 LTS (Focal Fossa)
    CPU: (32) x64 AMD EPYC 7763 64-Core Processor
    Memory: 90.31 GB / 125.79 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Browsers:
    Chrome: 143.0.7499.192
  npmPackages:
    @types/react: patch:@types/react@npm%3A18.3.12#~/.yarn/patches/@types-react-npm-18.3.12-69c5fbaab9.patch => 18.3.12 
    @types/react-dom: ^18.3.0 => 18.3.5 
    react: ^18.2.0 => 18.3.1 
    react-dom: ^18.2.0 => 18.3.1

Current Behavior

When items wrapped in Overflow and OverflowItem respectively overflow, the subsequent change of ordering does not reapply keeping previously "overflown" items hidden.

Once overflow logic is triggered again (for example by resizing) the order is properly restored.

See also Stackblitz repro.

Expected Behavior

Items should be reordered correctly immediately after state change.

Reproduction

https://stackblitz.com/edit/oknghi3z?file=src%2FApp.tsx

Steps to reproduce

  1. Render a list of items inside of Overflow, each wrapped with OverflowItem
  2. Trigger overflow by making a viewport smaller
  3. Reorder items via React
  4. Observe the issue

Are you reporting an Accessibility issue?

None

Suggested severity

Urgent - No workaround and Products/sites are affected

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

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