I am developing an app with React and I use gridjs-react in it to display a list of affiliates, but I have this problem.
Uncaught (in promise) Error: The target container is not a DOM element.
at Object.render (react-dom.development.js:26091:1)
at r.componentDidMount (wrapper.tsx:16:1)
at tslib.en6.js:18:1
at Array.some (<anonymous>)
at tslib.en6.js:18:1
at Array.some (<anonymous>)
at R (tslib.en6.js:18:1)
at tslib.en6.js:18:1
at Array.some (<anonymous>)
at k (tslib.es6.js:18:1)
The first time the component is mounted it loads the data without any problem, but from the second time it gives me that error and does not show any data that should be showing. Also, this does not happen on desktop, it only happens on mobile.
This is my gridjs-react code using the Grid component:
<Grid
data={data}
columns={columns}
pagination={{ enabled: true, limit: 5 }}
search
sort
className={{
container: classes.ContainerTable,
footer: classes.FooterTable,
header: classes.HeaderTable,
search: classes.SearchTable,
th: classes.ThTable,
thead: classes.TheadTable,
tr: classes.TrTable,
td: classes.TdTable,
pagination: classes.PaginationTable,
paginationButtonCurrent: classes.PaginationButtonCurrent,
paginationButtonNext: classes.PaginationButtonNext,
paginationButtonPrev: classes.PaginationButtonPrev,
}}
/>
PS: data and columns are props of the component in which Grid is located.
If you have any idea what could be happening I would greatly appreciate it :)