Skip to content

fix(popup): suppress content while disabled - #4486

Closed
Xapollon430 wants to merge 1 commit into
Tencent:developfrom
Xapollon430:codex/disabled-popup-content
Closed

Xapollon430 wants to merge 1 commit into
Tencent:developfrom
Xapollon430:codex/disabled-popup-content

Conversation

@Xapollon430

Copy link
Copy Markdown
Contributor

🤔 这个 PR 的性质是?

  • 日常 bug 修复

🔗 相关 Issue

Closes #4485.

💡 需求背景和解决方案

DatePicker, DateRangePicker, and TimePicker pass their disabled state to Popup. A Popup that was already open still renders its content and accepts selections. Derive the actual popup visibility from its disabled state and remove the content immediately while disabled, including during the exit transition. This also covers a controlled Popup whose caller still passes visible={true}.

To reproduce, open a picker, set its disabled prop from the parent, then try to choose a new value. The value should stay unchanged. Re-enable the picker and select a value to check normal interaction.

DatePicker recording · DateRangePicker recording · TimePicker recording

The new regression fails on the baseline and passes with the fix. The Popup, SelectInput, DatePicker and TimePicker suites passed with 137 tests across nine files using the repository's Vitest configuration and a local alias for the checked-out common submodule.

📝 更新日志

tdesign-react

  • fix(Popup): prevent selections from a popup after its picker becomes disabled

☑️ 请求合并前的自查清单

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@tdesign-bot

Copy link
Copy Markdown
Collaborator

TDesign Component Site Preview Open

Component Preview
tdesign-react 完成
@tdesign-react/chat 完成

@pkg-pr-new

pkg-pr-new Bot commented Nov 13, 2026

Copy link
Copy Markdown
  • tdesign-react-demo

    npm i https://pkg.pr.new/tdesign-react@4486
    
    npm i https://pkg.pr.new/@tdesign-react/chat@4486
    

commit: 01d7ec8

@RylanBot

Copy link
Copy Markdown
Collaborator

Please continue fixing the issue in the existing PR #4468 instead of opening a new PR.

@RylanBot RylanBot closed this Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Popup] Disabled picker popups still accept selections

3 participants