This repository was archived by the owner on Nov 4, 2025. It is now read-only.

Description
Look here :)
It seems that the onAlign prop is cached as forceAlignPropsRef.current.onAlign, such that it can be used inside the callback passed into useBuffer, using the latest passed in props value.
However, that whole code does not use the forceAlignPropsRef.current.onAlign value, but the closured onAlign value instead. I think this is wrong, and I believe it is causing ant-design/ant-design#27018.
It is all already prepared. I think we just have to use onAlign the same way we use disabled & target in L67, destructuring it to latestOnAlign.