Closed Themandunord closed 7 years ago
Should work fine, no idea. Can you give a codepen with the error you have?
Just an update,
I don't have time to make a codepen actually. But I fine a workaround that work.
In the parent of the ReactHeight (so my component), I redefine the getElementHeight function :
<ReactHeight
hidden={true}
getElementHeight={this.__getElementHeight}
onHeightReady={height => this.setState({clientHeight: height})}>
{this.props.children}
</ReactHeight>
__getElementHeight(el){
if(el) {
return this.clientHeight = el.clientHeight;
}
return this.clientHeight;
},
this.clientHeight
it's a variable of my class.
It's weird but it's works...
Otherwise, thank you for this component ;)
Cheers!
Hi,
When I use the hidden prop, I have an error in the console :
The content is null with this prop, but why I have the error ?
Thanks.