orfium-ictinus icon indicating copy to clipboard operation
orfium-ictinus copied to clipboard

TypeError: Cannot read property 'parentElement' of null

Open SVonKarajann opened this issue 5 years ago • 0 comments

When trying to use recharts ResponsiveContainer, we 're getting the following error from storybook.test.ts TypeError: Cannot read property 'parentElement' of null caused by the use of refs, as indicated in this thread

In order to bypass that we used the solution shown below: https://github.com/Orfium/orfium-ictinus/blob/5cad266bca194b026e44a61e7eed21c55c9d1bd0/src/components/LineChart/LineChart.tsx#L98-L123 As pointed out in the comment below: "Besides that, you created a dependency on a system variable (NODE_ENV). We may face side effects by using this component on a third-party project.

Maybe we should consider removing the dummy component."

Originally posted by @michalisKout in https://github.com/Orfium/orfium-ictinus/pull/122#discussion_r551945045

A better solution is required in the future

SVonKarajann avatar Jan 07 '21 16:01 SVonKarajann