-
Notifications
You must be signed in to change notification settings - Fork 52
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
onUpdate bug #1
Comments
good catch. The intent was to pass out the panels object, yeah. Related to this, when you update the props externally it's supposed to update the internal panels state in componentWillReceiveProps, but it's not making a correct props comparison so it wont work. I'll fix both of these issues. |
Thanks Dan. I want to do a mash up of your component and this: http://zippyui.com/docs/react-split-container. |
Pushed a fix. To do what you want, maintain the panel widths in your container's state and supply it to the PanelGroup as a panelWidths prop. Stay in sync with the PanelGroup's internal state changes by supplying a hook to props.onUpdate that then updates your container's copy. With that, you should be able to collapse a panel programmatically or whatever other special thing you want to do. I tested this scenario locally, but let me know if you get it working too. |
Cheers bro, appreciate your time. |
I'll make some modifications and submit a pull request if I decide to use it for the current project to incorporate more customisability. Thanks again for it. |
Can you please publish an update to npm. |
Done. Closing issue |
Great component, thanks!
What argument are you intending to pass to onUpdate callback as this.state.props doesn't exist?
this.state.panels?
The text was updated successfully, but these errors were encountered: