Skip to content

[Table] Expose ColumnResizerContext and other contexts from RAC #7733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jaknas opened this issue Feb 6, 2025 · 0 comments
Open

[Table] Expose ColumnResizerContext and other contexts from RAC #7733

jaknas opened this issue Feb 6, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@jaknas
Copy link

jaknas commented Feb 6, 2025

Provide a general summary of the feature here

Hi team. I've been trying to replicate RAC Table components based on react-aria hooks since I'd like to get access to internals like column.index from inside the Column component.

As far as I'm aware, it's not possible to get access to that just by using RAC components. We need to drop a layer down and use hooks combined with createLeafComponent, basically replicating what's already implemented in RAC.

What's blocking me currently from doing that is access to some internal contexts that are not exported from RAC, in case of column e.g ColumnResizerContext. I wouldn't mind also getting access to ResizableTableContainerContext.

🤔 Expected Behavior?

All contexts in Table.tsx are exported to allow consumption from outside of RAC.

😯 Current Behavior

Only part of contexts (e.g TableContext) are exposed.

💁 Possible Solution

Expose contexts. Alternatively, provide ways to access internal data like e.g column.index from inside of Column component.

Maybe there's already an existing way to achieve it? Like wrapping RAC components in another layer of createLeafComponent?

🔦 Context

I'm trying to implement some responsive features like e.g column dropping based on table width. This needs to be done generically with respect to how those Tables can be constructed based on RAC documentation (render props, created statically etc.).

💻 Examples

No response

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@snowystinger snowystinger added the enhancement New feature or request label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants