re-resizable icon indicating copy to clipboard operation
re-resizable copied to clipboard

Parent with display: "flex", flexDirection: "column", and resizable element height: "number in percent"

Open Bouncue opened this issue 5 years ago • 8 comments

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

Bouncue avatar May 26 '19 04:05 Bouncue

I am seeing the exact same issue. Is there an update on this?

krisfrenette avatar Jun 13 '19 14:06 krisfrenette

I would also be interested in a solution for this issue.

lc-101 avatar Jul 12 '19 19:07 lc-101

Bump... seeing this issue too

Cwl100 avatar Oct 30 '19 13:10 Cwl100

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',
            }}
...

xQsme avatar Oct 30 '19 13:10 xQsme

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.

blshort43 avatar May 20 '20 19:05 blshort43

Another workaround is to render a <style> tag with the percentage height in the height style, and show it onResize and remove it onResizeStop

bfintal avatar Feb 27 '21 12:02 bfintal

Another workaround is to render a <style> tag with the percentage height in the height style, and show it onResize and remove it onResizeStop

Could you please provide a demonstrate?

MrKou47 avatar May 21 '21 10:05 MrKou47

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.

aitella avatar Oct 28 '21 18:10 aitella