Open Bouncue opened 5 years ago
I am seeing the exact same issue. Is there an update on this?
I would also be interested in a solution for this issue.
Bump... seeing this issue too
Simple workaround: Define the component has having a px size then on the components's did mount function set it to a percentage:
componentDidMount() {
document.getElementById('content').style.height = '30%';
}
...
render() {
return (
<Resizable
className="content"
id="content"
onResize={this.onResize}
defaultSize={{
height: '300px',
}}
...
Simple workaround: Define the component has having a px size then on the components's did mount function set it to a percentage:
componentDidMount() { document.getElementById('content').style.height = '30%'; } ... render() { return ( <Resizable className="content" id="content" onResize={this.onResize} defaultSize={{ height: '300px', }} ...
Thanks xQsme!! Glad I found this. I was messing with the dang thing for hours thinking I was doing something wrong.
Another workaround is to render a <style>
tag with the percentage height in the height
style, and show it onResize
and remove it onResizeStop
Another workaround is to render a
<style>
tag with the percentage height in theheight
style, and show itonResize
and remove itonResizeStop
Could you please provide a demonstrate?
seeing this issue too and workaround with componentDidMount
is not an option for ma as well as do not use display: flex
on a parent.
Please take a look and help me how to make resize bottom work:
CodeSanbox
158 Can't resize height if it's given in percents