Get Error when I start to scroll:
Uncaught TypeError: Cannot read properties of null (reading 'getPanel')
at GridComponent.Grid.getContent (grid.js:1665:1)
at Scroll.makeStickyHeader (scroll.js:430:1)
When I remove enableStickyHeader from GridComponent everything works just fine.
Please help!
Hi Maghzan,
Greetings from Syncfusion Support,
Query - Get error when EnableStickyHeader
We have analyzed your query and we understand that you are facing issue while enabling StickyHeader on grid . But before proceeding we need some more details about your requirement to validate the issue at our end. Kindly Share the following details.
1. Share Grid rendering code snippet.
2. Share your Syncfusion version details.
3. Share your grid packages .
4. Share some screenshots related to the issue.
Note : Our grid sample works fine with StickyHeader, Please refer the sample for your reference.
Sample - https://stackblitz.com/edit/react-t7kupk?file=index.js
Regards,
Jayshankar Manoharan.
This error show up when you navigate from one grid list to another grid list with both enableStickyHeader, but you reload on one page this error does not show up.
Hi Magzhan,
Sorry for the inconvenience,
We are currently working on your query, we will update further details on June 1, 2022.
Until then we appreciate your patience.
Regards,
Jayshankar Manoharan
Hi Maghazan,
Sorry for the inconvenience caused,
Currently we are working on your query, we will update further details within two business days.
Until then we appreciate your patience.
Regards,
Jayshankar Manoharan.
Is there any updates on this issue ?
Hi Magzhan,
Thanks for your patience.
We tried to reproduce the reported problem at our end, but it was unsuccessful. Please find the below sample for your reference.
Sample: https://stackblitz.com/edit/react-ya7bhe?file=index.js
Kindly share the below details to replicate this.
Regards,
Rajapandiyan S
Hi, replicated the error with enableStickyHeader, here is the link:
https://codesandbox.io/s/error-enablestickyheader-vqro56
Try to navigate between pages Home -> GridList -> Home and Scroll
Hi Magzhan,
Thanks for sharing the details.
Currently, we are validating the issue “Script error while routing with sticky header feature” at our side. So, we will provide further details on June 21, 2022. Until then we appreciate your patience.
Regards,
Pavithra S
Hi Magzhan,
Thanks for your patience.
We have validated the reported scenario and found that the “scroll” event is not removed properly from the document which causes the reported issue. So, we suggest using the below solution to the second Grid to overcome this. Please refer to the below code example and sample link for more information.
|
<GridComponent id="Grid2" destroy={function (e) { document.removeEventListener( "scroll", this.scrollModule.makeStickyHeader ); }} dataSource={data} enableStickyHeader={true} >
|
https://codesandbox.io/s/error-enablestickyheader-forked-cqhd9v?file=/src/components/GridList.jsx
Please get back to us if you need further assistance on this.
Regards,
Pavithra S