Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CozyDialogs: unable to measure consistently the height of the title bar via titleRef #2185

Open
PolariTOON opened this issue Jul 4, 2022 · 0 comments

Comments

@PolariTOON
Copy link
Contributor

#2010 introduced a titleRef prop on CozyDialogs to be able to measure the height of the DialogTitle from outside the component. Unfortunately this does not work consistently in the app coachCO2 where it seems to be measured as 0 when mounting the map, resulting in the map not being perfectly centered. According to https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-dom-node , the useEffect hook + titleRef as a parameter combination may not be suitable for this use case. It is not clear if it can be solved on the app side, so we should likely find another way to expose or watch the height.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant