I added a MutationObserver to the element to check if there's a parent container available (which is only the case if the element is not hidden via display: none on itself or one of the parent elements). This ensures that if the element becomes visible again, the re-rendering is being triggered.
It works for my use case, but please give some feedback on performance and if it's also solving other people's problems.
Referring to https://github.com/antoniolago/react-gauge-component/issues/40
I added a MutationObserver to the element to check if there's a parent container available (which is only the case if the element is not hidden via
display: none
on itself or one of the parent elements). This ensures that if the element becomes visible again, the re-rendering is being triggered.It works for my use case, but please give some feedback on performance and if it's also solving other people's problems.