React: accessor function don't trigger when data is outside of exported component
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- react, typescript
- 领域
- frontend
调研方向
从链接的 CodeSandbox 开始,尤其是 /src/NoWorks.tsx,并在 English 和 Netherlands 之间切换时,将其组件外数据与正常工作的示例进行比较。确认 accessor 函数是否在重新渲染期间被跳过,然后追踪 v8.5.15 中涉及的 React 表格行为。当 accessor 执行且两个示例中渲染出的翻译都更新时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
We faced an issue regarding some cells in our application not triggering their translations correctly.
Looking at the attached codesandbox you can see 2 examples. One working and one not.
We discovered that when data is defined outside the export of the component .accessor function don't trigger as expected.
Your minimal, reproducible example
https://codesandbox.io/s/i18next-react-table-forked-2znx8c?file=/src/NoWorks.tsx
Steps to reproduce
- Go to https://codesandbox.io/s/i18next-react-table-forked-2znx8c?file=/src/NoWorks.tsx
- Open console
- On default you see 'en' language logged by both the 'works' and 'noWorks' component.
- Click on Netherlands button
- You will see the 'works' rendered language console.log inside 'columnHelper.accessor' does correctly trigger
- You will also see the counter for 'noWorks' triggered but the rendered language console.log inside 'columnHelper.accessor' don't trigger
- Click on English button and see step 5 to 6 repeated.
Expected behavior
As a User I am expecting the accessor function to trigger despite the DataTable data being imported from outside the component or initiated inside the component.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- OS: macOS, Windows
- Browser: Chrome, Safari, Firefox
react-table version
v8.5.15
TypeScript version
v4.8.4
Additional context
No response
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
- 主要语言
- TypeScript
- 星标
- 28.4k
- 派生
- 3.6k
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 4
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/table 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 78/100
-
难度 4/5 3-5 天 新手友好度 38/100
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 78/100
-
难度 5/5 一周以上 新手友好度 35/100
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 88/100
motiondivision/motion#3849 ·
-
check:passed streams:add
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 68/100
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
i-am-bee/beeai-framework#1697 · 1 个 reaction ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
antfu/node-modules-inspector#214 ·