Skip to content

fix: fix TableView from crashing when another collection is rendered as empty state#9557

Merged
yihuiliao merged 7 commits intomainfrom
nested-collection-tableview-bug
Feb 10, 2026
Merged

fix: fix TableView from crashing when another collection is rendered as empty state#9557
yihuiliao merged 7 commits intomainfrom
nested-collection-tableview-bug

Conversation

@DPandyan
Copy link
Collaborator

@DPandyan DPandyan commented Jan 29, 2026

Closes <No issue created yet, can create one if needed>

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Just open the last story. Remove the extra CollectionRendererContext.Provider wrapping the Tabs to see the original error.

🧢 Your Project:

Quarry

@DPandyan DPandyan marked this pull request as draft January 29, 2026 23:52
@DPandyan DPandyan changed the title bug: Story for displaying bug of nested collections in TableView wip: Story for displaying bug of nested collections in TableView Jan 29, 2026
@rspbot
Copy link

rspbot commented Feb 5, 2026

];
const renderEmptyState = () => (
<Tabs aria-label="Settings">
<CollectionRendererContext.Provider value={DefaultCollectionRenderer}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll want to delete this line, which should cause the test to fail.
Once that's verified, we'll want to add this line around the renderEmptyState call so that the rendered child doesn't pick up the wrong context

<div className={centeredWrapper}>

@DPandyan DPandyan changed the title wip: Story for displaying bug of nested collections in TableView wip: wrap renderEmptyState in CollectionRendererContext.Provider in TableView component Feb 6, 2026
@rspbot
Copy link

rspbot commented Feb 7, 2026

@rspbot
Copy link

rspbot commented Feb 8, 2026

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@snowystinger snowystinger changed the title wip: wrap renderEmptyState in CollectionRendererContext.Provider in TableView component fix: TableView renderEmptyState contains another collection Feb 8, 2026
@snowystinger snowystinger marked this pull request as ready for review February 8, 2026 22:41
@rspbot
Copy link

rspbot commented Feb 8, 2026

@snowystinger snowystinger added the small review Easy to review PR label Feb 8, 2026
@yihuiliao yihuiliao changed the title fix: TableView renderEmptyState contains another collection fix: fix TableView from crashing when another collection is rendered as empty state Feb 10, 2026
@github-project-automation github-project-automation bot moved this from 🩺 To Triage to 👀 In Review in RSP Component Milestones Feb 10, 2026
@yihuiliao yihuiliao added S2 no testing Does not require manual testing during testing session labels Feb 10, 2026
@yihuiliao yihuiliao added this pull request to the merge queue Feb 10, 2026
@yihuiliao yihuiliao moved this from 👀 In Review to ✅ Done in RSP Component Milestones Feb 10, 2026
Merged via the queue into main with commit b8f8d1d Feb 10, 2026
31 checks passed
@yihuiliao yihuiliao deleted the nested-collection-tableview-bug branch February 10, 2026 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no testing Does not require manual testing during testing session ready for review S2 small review Easy to review PR

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants