Skip to content
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

Datagrid NestedRows extension crashes in SSR #4203

Closed
1 of 3 tasks
hoiwingh opened this issue Feb 2, 2024 · 1 comment
Closed
1 of 3 tasks

Datagrid NestedRows extension crashes in SSR #4203

hoiwingh opened this issue Feb 2, 2024 · 1 comment
Assignees
Labels
component: Datagrid type: bug 🐛 Something isn't working version: 1 Carbon 10 / v1 version: 2 Carbon 11 / v2

Comments

@hoiwingh
Copy link
Contributor

hoiwingh commented Feb 2, 2024

What package(s) are you using?

  • Carbon for IBM Products (or Carbon for IBM Cloud & Cognitive)
  • Legacy/CDAI
  • Legacy/Security

Detailed description

When doing server-side rendering of Datagrid with the nested rows extension (useNestedRows), the server crashes with the following error:

document is not defined ReferenceError: document is not defined
    at useNestedRowExpander (/home/module/app/node_modules/@carbon/ibm-products/lib/components/Datagrid/useNestedRowExpander.js:32:20)

The extension references document which is not available on server side.
https://github.com/carbon-design-system/ibm-products/blob/main_v1/packages/ibm-products/src/components/Datagrid/useNestedRowExpander.js#L27

Steps to reproduce the issue

  1. Render Datagrid with useNestedRows on server side
@github-project-automation github-project-automation bot moved this to Needs triage 🧐 in Carbon for IBM Products Feb 2, 2024
@hoiwingh hoiwingh changed the title Datagrid nestedRows extension crashes in SSR Datagrid NestedRows extension crashes in SSR Feb 2, 2024
@matthewgallo matthewgallo self-assigned this Feb 2, 2024
@matthewgallo matthewgallo moved this from Needs triage 🧐 to In progress in Carbon for IBM Products Feb 2, 2024
@matthewgallo matthewgallo added type: bug 🐛 Something isn't working component: Datagrid version: 2 Carbon 11 / v2 version: 1 Carbon 10 / v1 labels Feb 2, 2024
@matthewgallo matthewgallo moved this from In progress to Needs review 👋 in Carbon for IBM Products Feb 2, 2024
@matthewgallo
Copy link
Member

PR for both v1 and v2 have been merged, this will be released tomorrow morning.

@matthewgallo matthewgallo moved this from Needs review 👋 to Done 🚀 in Carbon for IBM Products Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Datagrid type: bug 🐛 Something isn't working version: 1 Carbon 10 / v1 version: 2 Carbon 11 / v2
Projects
Archived in project
Development

No branches or pull requests

2 participants