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

Invalid ref in NextJS

オープン
#387 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

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

調査の方向性

ドキュメントサイトの Inline Editing の例とカスタム EditableCell 実装から始め、ref がどのように渡されるか、また targetRef がいつ利用可能になるかに注目してください。NextJS 環境で例を再現し、その後、初回のレンダリング中に ref が null にならず、セル項目を確実に編集できることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

Is there a way to pass the ref to custom cell renders in NextJS environment?

The Inline Editing example in the documentation website doesn't work in NextJS because the ref provided to EditableCell is always null. I have tried various workarounds like loading the component dynamically and then using React.ForwardRef (link) but nothing seems to work. Even tried disabling SSR explicitly. The ref passed in is only valid after the first render cycle and it seems in the EditableCell class it tries to render with a null ref. You have some code protecting against this situation: {editing && this.targetRef && ( but I'm wondering if there is a nicer or cleaner way to do this? I'm mainly looking for a way to edit the cell items.

主要言語
TypeScript
スター
1.5k
フォーク
171
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

Autodesk/react-base-table のほかの issue

Autodesk/react-base-table の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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