Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting initial panel width #12

Open
dylanhusted opened this issue Oct 27, 2020 · 0 comments
Open

Setting initial panel width #12

dylanhusted opened this issue Oct 27, 2020 · 0 comments

Comments

@dylanhusted
Copy link

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

In my case it starts at 395px:

Screenshot from 2020-10-27 16-53-23

In my usage of <ResizePanel />, I'm also seeing my initial width set via the style 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#L25

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant