-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
Layout normalisation warning on a PanelGroup with 0 children #396
Comments
I’m not opposed to a different warning in that case! Seems like an empty panel group is probably still something worth warning about (in Dev mode) but I agree that message is goofy |
The warning has been removed entirely for empty panel groups as of v2.1.2 ❤️ → ☕ givebrian.coffee |
Legend! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Building upon the example provided in #126 (using the exact same code, but with the most recent version of react-resizable-panels) you get a rather large console warning if you intentionally set the layout of a container to an empty array.
output.mp4
I wonder if this warning is necessary as the library seems to handle the scenario rather well bar some drag positioning shenanigans (which is likely a dnd-kit issue and not react-resizable-panels issue). Its also worth noting that this warning is not formatted correctly for scenarios where you are setting the size to 0. So I wonder if its safe to say that the normalisation can be performed on a PanelGroup if its final state is empty.
The text was updated successfully, but these errors were encountered: