SAP / ui5-webcomponents-react

A wrapper implementation for React of the UI5 Web Components that are compliant with the SAP Fiori User Experience
https://sap.github.io/ui5-webcomponents-react/
Apache License 2.0
437 stars 98 forks source link

[SF][Feature Request][DynamicPage] Provide us a parameter to get the height of DynamicPageTitle DOM #3550

Closed sfsf-xweb-sh closed 1 year ago

sfsf-xweb-sh commented 2 years ago

Dear colleagues, I am from SuccessFactors Web Experience Shanghai team.

Provide us a parameter to get the height of DynamicPageTitle DOM

Screen Shot 2022-09-21 at 10 51 27 AM

Lukas742 commented 1 year ago

Hi @sfsf-xweb-sh

you can get the height by accessing the HTMLElement of the DynamicPageTitle. You can achieve that by either using a React Ref (recommended way) or by using e.g. a querySelector. If you want to update the component corresponding to the height of the DynamicPageTitle you could use a ResizeObserver.

Since not everyone will need this feature and implementing e.g. a callback that is fired each time the height of the DynamicPageTitle changes, would require us to implement another ResizeObserver, we decided not to offer this option and leave it up to the app developer to implement.