Open dylanhusted opened 3 years ago
Looking at the demo, the panel labeled "right panel with custom handle default 400px" doesn't seem to default to 400px, despite style being set that way here: https://github.com/bjgrosse/react-resize-panel/blob/master/demo/src/App.js#L22
style
In my case it starts at 395px:
In my usage of <ResizePanel />, I'm also seeing my initial width set via the style attribute not being respected.
<ResizePanel />
Looking in the source code, the initial width/height is not being grabbed from props.style, so this behavior does make sense: https://github.com/bjgrosse/react-resize-panel/blob/master/src/ResizePanel.js#L25
props.style
That makes this library unusable for a case where I need to start with a 50% width, and let the user resize up or down from there.
Is there something I'm missing here?
Thanks for the library, and I could offer some help here if you're unable to patch this.
Looking at the demo, the panel labeled "right panel with custom handle default 400px" doesn't seem to default to 400px, despite
style
being set that way here: https://github.com/bjgrosse/react-resize-panel/blob/master/demo/src/App.js#L22In my case it starts at 395px:
In my usage of
<ResizePanel />
, I'm also seeing my initial width set via thestyle
attribute not being respected.Looking in the source code, the initial width/height is not being grabbed from
props.style
, so this behavior does make sense: https://github.com/bjgrosse/react-resize-panel/blob/master/src/ResizePanel.js#L25That makes this library unusable for a case where I need to start with a 50% width, and let the user resize up or down from there.
Is there something I'm missing here?
Thanks for the library, and I could offer some help here if you're unable to patch this.