react-resizable
react-resizable copied to clipboard
Why is width a required prop?
Thanks for opening an issue!
Please select the type of issue you're reporting. For questions.
- [ ] Bug
- [ ] Feature Request
- [x] Question
Problem Report
I don't have width
set on my Resizable
because it is a full-width bar with only the y
axis resizable.
It works fine, but I get a React warning about this. I can't set it to '100%'
either since it requires a number.
Is this prop actually required in my case (doesn't seem to be) and if not can it be marked as such?

System Info
Node Version: v6.11.0 Browser: Chrome 59.0 OS: macOS 10.12.5
+1 to the fact '100%' can't be set to width/height. Do you have plans of changing it?
Thanks for the cool library.
Same problem. Need height to be set 100% Upd: ok, have solved problem by setting height and constraints to 'Infinity' value
Setting width values to Infinity
worked for me.
Something like:
<ResizableBox
className="box"
width={Infinity}
height={400}
handleSize={[10, 10]}
minConstraints={[Infinity, 300]}
maxConstraints={[Infinity, Infinity]}
axis="y"
>
{stuff}
</ResizableBox>
I'm sure it's wrong for reasons, but nothing complains.
But I set height = {Infinity}, the height is 0; and element' size is number * 0.
So there is no fix for this?
I wanted to make something like this from polaris but not able to set the on-load witdth to 100% or inherit from parent.