Skip to content

TypeError: Cannot read property 'offsetWidth' of null. When switching between multiple engines using ant tabs. #748

Open
@agarwalishan

Description

@agarwalishan

Hey, I have made a component in which I am initializing engine directly or with the serialized diagram if passed as props. This component has key, serialized-diagram as props. Whenever key changes the component is destroyed as per react rules and component is re-mounted that means engine gets reinitialized. And at that time I am getting this error.
Actually key is changing whenever I am switching Ant Tabs to display respective engine. And this error does not come always generally when tabs are switched quickly.
When I was working with only one component like this then problem never appeared.
Can someone please tell me what could be the reason?

Please ZoomIn images if not clearly visible
image
image

And if someone knows what could be the reason for this error if not related to my case then also please comment so that I can move in right direction.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions