[Table] Context from a wrapper around Column is lost when the column header renders
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
Start with the minimal Table/Column reproduction using react-aria-components 1.21.1, @tanstack/react-table 9.2.4, and React 19.3.0, then trace how RAC collects and renders Column header content. Confirm the failure of useHeaderContext() and investigate whether the provider can remain available or whether a renderer API is needed. Done means the header context works through Column rendering, or a documented way exists to pass the collected header instance explicitly.
索引モデルが issue の本文から書いたものです。
説明
Description
I am integrating TanStack Table v9's createTableHook with React Aria Components Table. TanStack’s hook factory can register header components that use a context hook such as useHeaderContext() to access the current TanStack header's state.
This works when the registered component is rendered in the normal React tree. It fails when used as the content of a React Aria Column: RAC collects the column definitions and renders their header content through its collection machinery, outside the wrapper’s context provider.
This seems related to #7049: “Context set in collection item node not propagating”, which describes the same general context-propagation problem. This report is a concrete Table/Column integration case.
Minimal example
A simplified TanStack hook registers a component that reads the current header from context:
const { useAppTable, useHeaderContext } = createTableHook({
features,
headerComponents: {
SortableHeader: () => {
const header = useHeaderContext();
return (
<Column
id={header.id}
allowsSorting={header.column.getCanSort()}
>
<FlexRender header={header} />
</Column>
);
},
},
});
The app wraps that component in TanStack’s header provider:
<table.AppTable>
<Table>
<TableHeader>
{headers.map((header) => (
<table.AppHeader header={header} key={header.id}>
{(appHeader) => <appHeader.SortableHeader />}
</table.AppHeader>
))}
</TableHeader>
{/* rows */}
</Table>
</table.AppTable>
At runtime, useHeaderContext() throws:
useHeaderContext must be used within an AppHeader or AppFooter component.
Passing the header explicitly instead of reading it from context works around the problem:
<Column id={header.id} allowsSorting={header.column.getCanSort()}>
<FlexRender header={header} />
</Column>
Expected behavior
A React context provider around a Column’s rendered header content would remain available to that content, or RAC would provide an API for passing the collected column/header instance to the renderer without relying on context.
Actual behavior
The provider appears to wrap the JSX returned for the column, but the content rendered by RAC’s collection-based table header does not receive that context.
Environment
react-aria-components:1.21.1@tanstack/react-table:9.2.4- React:
19.3.0
- 主要言語
- TypeScript
- スター
- 16k
- フォーク
- 1.6k
- 平均マージ
- 3日 9時間
- マージ済み PR(30日)
- 45
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
adobe/react-spectrum のほかの issue
-
accessibility bug PreviewTrigger
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
adobe/react-spectrum#10917 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
S2 quiet Picker menu is always 192px wide: its width calc() has no unit対応中かも @darshpatel1052 が 2 日前に担当しました。 オープンwaiting on author
難易度 2/5 1時間未満 初心者へのやさしさ 88/100
adobe/react-spectrum#10909 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
DatePicker omits timezone for initially empty fields despite zoned placeholderValue対応中かも @mrlexcoder が 2 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
adobe/react-spectrum#10900 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Separator adds a redundant role="separator" to its default <hr>対応中かも @Janani-bn が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
adobe/react-spectrum#10894 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
ComboBox with selectionMode="multiple": Cmd/Ctrl+A does nothing while the popover is open対応中かも @mangeshraut712 が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
adobe/react-spectrum#10866 ·
メンテナーはふだん 1 日以内に返信
adobe/react-spectrum の issue をすべて見る
似ている issue
-
[Text] Add Reading Time & Word Count Estimator for Reflection Notes in src/lib/text/reading-time.tsオープンarea:core beginner-friendly community contributions-welcome difficulty:easy enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
[fullsend] E2E: scorecard — filecheck GitLab entity metrics unavailable due to initialDelay timingオープンe2e-failure ready-to-code
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
redhat-developer/rhdh-plugin-export-overlays#4698 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
devswha/herdr-web-ui#2884 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
b:minor bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
software-mansion/argent#1771 ·
メンテナーはふだん 1 日以内に返信