Page 1 of 1
Row Expander Error - TypeError: shadowRootContainer.attachShadow is not a function
Posted: Fri Aug 02, 2024 2:17 pm
by edonovan
Hi,
I am using LWC in salesforce and version 5.6.11 of Bryntum grid. When I copy the code from this demo - https://www.bryntum.com/products/grid/examples/rowexpander-regions/
into my local code base I am seeing the following error when I try to expand a row group:
TypeError: shadowRootContainer.attachShadow is not a function
at createWidget (grid.lwc.module.js:92860:82)
at RowExpander.renderExpander (grid.lwc.module.js:92958:13)
at RowExpander.beforeRenderRow (grid.lwc.module.js:92707:16)
at functionChainRunner (grid.lwc.module.js27)
at plugInto.<computed> [as beforeRenderRow] (grid.lwc.module.js47)
at Row.render (grid.lwc.module.js:70701:14)
at RowManager.renderFromRow (grid.lwc.module.js:75716:15)
at RowManager.renderFromRecord (grid.lwc.module.js:75654:16)
at RowExpander.internalRender (grid.lwc.module.js:93089:30)
at eval (grid.lwc.module.js:93063:128)
Could you advise if this is reproducible on your side or there is anything which I can do with the given version of the grid?
Thanks,
Emma
Re: Row Expander Error - TypeError: shadowRootContainer.attachShadow is not a function
Posted: Fri Aug 02, 2024 2:27 pm
by alex.l
Hi Emma,
Please attach runnable code to debug runtime errors. It's hard to say what's the problem.
Try to use last lib version, do you still see the error? If no, you will need to upgrade. I believe that's a bug because of using old version.
If bus is still there, we will be happy to debug and help with the problem, when you shared your solution.
Thank you!
Re: Row Expander Error - TypeError: shadowRootContainer.attachShadow is not a function
Posted: Fri Aug 02, 2024 3:48 pm
by edonovan
Hi Alex,
I have tried updating the grid library to 6.0.1 and I am still getting the same error - it will take me some time to get my hands on a newer version due to limitations within my organization. In terms of the runnable code I have included the example link since I tried copying this exact code so I have the exact same feature configuration, data, column definitions etc - everything is taken from there and there is nothing additional. The only difference is that it is on LWC.
Re: Row Expander Error - TypeError: shadowRootContainer.attachShadow is not a function
Posted: Fri Aug 02, 2024 6:12 pm
by edonovan
I've tested it now with the latest version of the grid 6.0.4 and the same error is thrown.
Re: Row Expander Error - TypeError: shadowRootContainer.attachShadow is not a function
Posted: Mon Aug 05, 2024 12:04 pm
by alex.l
Hi,
I was able to reproduce some problems in Salesforce with RowExpander. I was not able to expand a row. I've opened a ticket here https://github.com/bryntum/support/issues/9746
You can subscribe on ticket updates to be notified when it's done.
If it's not a bug you faced with, please attach a runnable code here. Our demo code can't be used in Salesforce without changes, we need to see complete code you used to be on one page.
Re: Row Expander Error - TypeError: shadowRootContainer.attachShadow is not a function
Posted: Fri Aug 30, 2024 9:08 am
by joakim.l
After some investigation, we find that using the Shadow DOM and attachShadow
is prohibited in LWC when not using LWS.
Configuring the rowExpander with the widget
config or returning a Bryntum component (or a config object) in the RowExpander renderer, cannot therefore be supported in LWC non-LWS.
We will update the docs accordingly, and recommend usage of non-widget config or enabling LWS.