Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

React: accessor function don't trigger when data is outside of exported component

オープン
#4,485 コメント 6 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react, typescript
領域
frontend

調査の方向性

リンクされたCodeSandbox、特に /src/NoWorks.tsx から始め、English と Netherlands を切り替えながら、そのコンポーネント外のデータを動作する例と比較してください。rerender 中に 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
  1. Go to https://codesandbox.io/s/i18next-react-table-forked-2znx8c?file=/src/NoWorks.tsx
  2. Open console
  3. On default you see 'en' language logged by both the 'works' and 'noWorks' component.
  4. Click on Netherlands button
  5. You will see the 'works' rendered language console.log inside 'columnHelper.accessor' does correctly trigger
  6. You will also see the counter for 'noWorks' triggered but the rendered language console.log inside 'columnHelper.accessor' don't trigger
  7. 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.5k
フォーク
3.6k
平均マージ
1日 14時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TanStack/table のほかの issue

TanStack/table の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。