Skip to content

fix: duplicate unique identifiers in MeasureRow column headers#1378

Open
cactuser-Lu wants to merge 4 commits intoreact-component:masterfrom
cactuser-Lu:fix-duplicate-id-for-measurerow
Open

fix: duplicate unique identifiers in MeasureRow column headers#1378
cactuser-Lu wants to merge 4 commits intoreact-component:masterfrom
cactuser-Lu:fix-duplicate-id-for-measurerow

Conversation

@cactuser-Lu
Copy link
Copy Markdown
Contributor

@cactuser-Lu cactuser-Lu commented Oct 9, 2025

在使用 rc-table 时,当列标题包含 id、data-testid 等唯一标识符时,由于 MeasureRow 会复制列标题内容,会导致 DOM 中出现重复的标识符,这违反了 HTML 规范并可能影响测试和可访问性。
fix: ant-design/ant-design#55244

Summary by CodeRabbit

  • Bug Fixes
    • 自动清理度量行 DOM 中的重复 ID 与多余 data-* 属性,避免测试与组件间冲突导致的问题。
    • 优化列变更时的布局更新时机,减少闪烁与错位现象。
    • 提升组件稳定性与可访问性,改善边缘场景下的交互体验。

Loading
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.

MeasureRow is duplicating testid in Table

5 participants