[Table] Multiple renders on Shift+Tab

未关闭
#10,254 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

  • #10283 来自 @coolassassin —— 已关闭,未合并

评估

难度
3/5
预计耗时
1-2 天
新手友好度
65/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
react, typescript

调研方向

从 https://react-aria.adobe.com/Table 中的 Table 示例开始,在启用 React DevTools 的「Highlight updates」后复现 Shift+Tab 的行为。将该行为与 react-spectrum PR #10247 中描述的修复进行比较,然后验证 Shift+Tab 是否为每个单元格产生一次渲染,或只渲染必要的单元格,同时不会导致 Tab 操作出现回归。

由索引模型根据 Issue 内容生成。

描述

Provide a general summary of the issue here

If you Tab into the table, you can see the render in every single cell of the table
If you Tab out of the table, you can see the render in every single cell of the table
But if you press Shift + Tab to leave the table, you will see 4x renders of each cell in the table

Image
🤔 Expected Behavior?

Good: 1 render on any tab action
Excellent: render only the necessary cells, not the whole table

😯 Current Behavior

4x renders when you press Shift + Tab in table

💁 Possible Solution

This is a fix of this bug:
https://github.com/adobe/react-spectrum/pull/10247

🔦 Context

In our project, we have huge dynamic tables (many on one screen), and any additional rendering affects UX

🖥️ Steps to Reproduce

Turn on "Highlight updates" in React Dev Tools on this page:
https://react-aria.adobe.com/Table

Then focus on any cell in the table and then press Shift + Tab. You will see 4x on each table cell

Version

1.19.0 (latest)

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

MacOS

🧢 Your Company/Team

dxFeed(Devexperts)

🕷 Tracking Issue

No response

主要语言
TypeScript
星标
16k
派生
1.6k
平均合并
4 天 3 小时
30 天内合并 PR
39

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

adobe/react-spectrum 的其他 Issue

查看 adobe/react-spectrum 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。