[Table] Context from a wrapper around Column is lost when the column header renders
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 16k
- Forks
- 1.6k
- Merge medio
- 3 d 9 h
- PR fusionados (30 d)
- 45
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de adobe/react-spectrum
-
accessibility bug PreviewTrigger
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
adobe/react-spectrum#10917 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
S2 quiet Picker menu is always 192px wide: its width calc() has no unitPosiblemente ocupada @darshpatel1052 la tomó hace 1 día. Abiertowaiting on author
Dificultad 2/5 Menos de una hora Aptitud para principiantes 88/100
adobe/react-spectrum#10909 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
DatePicker omits timezone for initially empty fields despite zoned placeholderValuePosiblemente ocupada @mrlexcoder la tomó hace 2 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
adobe/react-spectrum#10900 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Separator adds a redundant role="separator" to its default <hr>Posiblemente ocupada @Janani-bn la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
adobe/react-spectrum#10894 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
ComboBox with selectionMode="multiple": Cmd/Ctrl+A does nothing while the popover is openPosiblemente ocupada @mangeshraut712 la tomó hace 8 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
adobe/react-spectrum#10866 ·
Los mantenedores suelen responder en 1 día
Todos los issues de adobe/react-spectrum
Issues similares
-
needs-area-label
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 2 días
-
Website: the hero tip's video play() has no catch, so a refused play is an unhandled rejectionAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
liberation-data/drivine#615 ·
Los mantenedores suelen responder en 1 día
-
backend bug ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
geolens-io/geolens#3639 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
radius-project/ai-extensions#1196 ·
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100