question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TableView fails to render on server side

See original GitHub issue

🐛 Bug Report

TableView seems to fail during server-side rendering (SSR).

🤔 Expected Behavior

TableView should not fail to render on server side.

😯 Current Behavior

TableView seems to fail during server-side rendering and throws the following error:

window is not defined

💁 Possible Solution

Surround the render with a conditional:

{typeof window !== 'undefined' && <TableView />}

🔦 Context

We’re using NextJS, so SSR is pretty common.

💻 Code Sample

Any TableView excerpt from the online docs will fail during SSR.

🌍 Your Environment

Software Version(s)
react-spectrum 3.15.1
Browser All
Operating System All

🧢 Your Company/Team

Adobe/RSP

🕷 Tracking Issue (optional)

N/A

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
snowystingercommented, Jan 15, 2022

Sure, ones that happen during events like onFocus probably wont’ be an issue, just FYI, since you can’t focus something during SSR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Retrieving data back from server side based on input
I'm doing a school project, its's multiple tables and tabBarControllers. Now, I want to display return data back from server side based on...
Read more >
Smoothen your table view data loading using ...
The simplest approach would be loading all 100 data using URLSession at once in viewDidLoad , then update the table view data source...
Read more >
TableView (JavaFX 8)
The TableView control is designed to visualize an unlimited number of rows of data, broken out into columns. A TableView is therefore very...
Read more >
BSP: Server Side Printing for tableViews
This approach uses an ALV to print the table. The ALV will not display or print a nested table structure. In fact I...
Read more >
TableView - React Spectrum Libraries - Adobe
Documentation for TableView in the React Spectrum package. ... See the docs for more information on how to perform server side sorting.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found