Thank you for the additional details.
This occurs as the columnMenu is set as an inline function and React, does not keep references to inline functions in the render. This is why, when we update the toggle on component did mount, the parent component is updated, and as the reference is not kept we call component did mount again of the columnMenu and we go into an endless loop.
The same will happen if we have an onOpen event and set the same logic there.
We have two options in this case:
1) Set the column menu to a function outside of render, this way updating the toggle state will not re-initialize the column menu:
2) Pass the current toggle value to the column menu component and only update it to true only if it is still false, to ensure we will not make the same update multiple times.
We can even combine both approaches to ensure a more stable solution.
Progress is here for your business, like always. Read more
about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.