Skip to content

Bug: Antd 5.23 Dropdown misplaces/flashes children unless forwardRef is used #52282

@fnune

Description

@fnune

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Steps to reproduce:

  1. Create new React 19 project with Antd 5.23
  2. Add @ant-design/v5-patch-for-react-19 and import it
  3. Render Dropdown with custom component as child
  4. Observe dropdown either misplaced or flashing
  5. Wrap custom component in forwardRef to verify fix

Note: Complete reproduction in attached sandbox

What is expected?

  • Dropdown correctly positions and persists when using custom component children, without needing forwardRef

What is actually happening?

  • Dropdown renders at wrong screen position
  • Dropdown flashes/disappears immediately
  • Must use forwardRef as a workaround
Environment Info
antd 5.23.0
React 19.0.0
System Linux melian 6.6.69 #1-NixOS SMP PREEMPT_DYNAMIC Thu Jan 2 09:32:11 UTC 2025 x86_64 GNU/Linux
Browser Mozilla Firefox 133.0.3

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions