Closed Psvensso closed 6 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
react-resizable-panels | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 8, 2024 6:25pm |
I'm going to tweak a few things but I think this approach seems reasonable. Thanks!
As described in #204 the hard dependency on global document can be an problem in some context.
TL;DR; on changes: Sets up a ref to the PanelGroup and adds it to the group context Prevented some prop drilling of the element. Initializes helper hooks with the new group element ref Set up a dependency parameter on the group element in the helper functions Decided to make the group element required instead of defaulting to document for testing purposes and for predicability. But could be nullable and default to document. Tweaked a few tests by adding the root element to the helper function
Fixes 204