Datagrid fails to render if added to virtual dom #5471
Labels
component: Datagrid
Sev 3
Visible or noticeable to users but does not impede functionality. Has a workaround.
status: waiting for author 💬
type: bug 🐛
Something isn't working
Package
Carbon for IBM Products
Description
Edge case that we see in SOAR when rendering Datagrid using virtual DOM.
const tableDomNode = document.createElement('div');
ReactDOM.render(, tableDomNode); // renders Datagrid with data
Component(s) impacted
Datagrid fails to render and an error is shown in console logs
chunk-OK4P3QOP.js?v=41e20ba8:3748 Uncaught TypeError: Cannot read properties of null (reading 'querySelector')
Browser
No response
@carbon/ibm-products (previously @carbon/ibm-cloud-cognitive) version
v2.21.0
Severity
Severity 1 = The design is broken in a critical way that blocks users from completing tasks or damages the brand. Affects major functionality, no workaround.
Product/offering
SOAR
CodeSandbox or Stackblitz example
https://stackblitz.com/edit/github-peuqjs?file=src%2FDatagridCrash%2FDatagridCrash.jsx,src%2Futils%2Fhelpers.jsx
Steps to reproduce the issue (if applicable)
Steps to reproduce
Expected results
Datagrid table is rendered in screen without any errors
Actual results
Table is not rendered and there is error in console logs
Release date (if applicable)
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: