nkbt / react-height

Component-wrapper to determine and report children elements height
MIT License
180 stars 27 forks source link

What about rendered children? - question/feature request #35

Closed McBenny closed 4 years ago

McBenny commented 6 years ago

I'm trying to use your module applied to a list of elements that include a bunch of images. Those images have an impact on height but the value returned is calculated before the images are actually rendered :-(. Could there be a parameter to take this into account? A bit like the oldish onReady / onLoad of jQuery.

nkbt commented 6 years ago

there is no way to know your content is changed in this case, you can flip dirty flag tho yourself to re-render component. This component is meant to be use in big tables and focused around performance on static elements rather then correctness over time on dynamic elements.

If you want "monitored" size try https://www.npmjs.com/package/react-element-resize or any of other alternatives.