fix(Select): use useComposeRefs for React 19 - #4360
Open
RylanBot wants to merge 2 commits into
Open
Conversation
RylanBot
requested review from
HaixingOoO,
NWYLZW,
ZWkang,
carolin913,
honkinglin and
uyarn
as code owners
August 17, 2026 08:37
Contributor
|
Size Change: 0 B Total Size: 115 kB ℹ️ View Unchanged
|
Collaborator
TDesign Component Site Preview Open
|
commit: |
Contributor
|
Size Change: +854 B (+0.09%) Total Size: 932 kB 📦 View Changed
ℹ️ View Unchanged
|
RylanBot
force-pushed
the
rylan/fix/select/ref
branch
from
August 17, 2026 09:14
268f5a8 to
1104131
Compare
HaixingOoO
approved these changes
Aug 17, 2026
React 19 detaches/reattaches refs and counts commit-phase updates as nested, so several long-standing patterns now blow the update depth limit when a Select opens inside a Dialog: - usePopper: drop flushSync around setState in popper's write phase and bail out when the computed styles/attributes are unchanged - Portal: stop keying the append/remove layout effect on triggerNode, whose identity changes on every render while the panel is open - Option: use an object ref instead of useDomRefCallback so mounting an option no longer dispatches setState from a ref callback - useRipple: accept a RefObject so callers can keep the DOM out of state - Input/SelectInput: pin useImperativeHandle deps and read the merged refs lazily, so the handle identity stops changing every render Co-authored-by: Cursor <cursoragent@cursor.com>
RylanBot
force-pushed
the
rylan/fix/select/ref
branch
from
August 17, 2026 10:06
514b0b8 to
1e145d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

🤔 这个 PR 的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
📝 更新日志
tdesign-react
@tdesign-react/chat
☑️ 请求合并前的自查清单