Skip to content

Releases: bvaughn/react-resizable-panels

0.0.60

27 Jan 19:55
Compare
Choose a tag to compare
  • Better support imperative API usage from mount effects.
  • Better support strict effects mode.
  • Better checks not to call onResize or onLayout more than once.

0.0.59

27 Jan 19:55
Compare
Choose a tag to compare
  • Support imperative panel API usage on-mount.
  • Made PanelGroup bailout condition smarter (don't bailout for empty groups unless pixel constraints are used).
  • Improved window splitter compatibility by better handling "Enter" key.

0.0.58

27 Jan 19:55
Compare
Choose a tag to compare
  • Change group layout to more thoroughly distribute resize delta to support more flexible group size configurations.
  • Add data attribute support to Panel, PanelGroup, and PanelResizeHandle.
  • Update API documentation to reflect changed imperative API method names.
  • PanelOnResize TypeScript def updated to reflect that previous size param is undefined the first time it is called.

0.0.57

27 Jan 19:55
Compare
Choose a tag to compare
  • #207: Fix DEV conditional error that broke data attributes (and selectors).

0.0.56

27 Jan 19:54
Compare
Choose a tag to compare

Support a mix of percentage and pixel based units at the Panel level:

<Panel defaultSizePixels={100} minSizePercentage={20} maxSizePercentage={50} />

Note: Pixel units require the use of a ResizeObserver to validate. Percentage based units are recommended when possible.

Example migrating panels with percentage units

v55 v56
<Panel
  defaultSize={25}
  minSize={10}
  maxSize={50}
/>
        
<Panel
  defaultSizePercentage={25}
  minSizePercentage={10}
  maxSizePercentage={50}
/>
        

Example migrating panels with pixel units

v55 v56
<PanelGroup
  direction="horizontal"
  units="pixels"
>
  <Panel minSize={100} maxSize={200} />
  <PanelResizeHandle />
  <Panel />
</PanelGroup>
        
<PanelGroup direction="horizontal">
  <Panel
    minSizePixels={100}
    maxSizePixels={200}
  />
  <PanelResizeHandle />
  <Panel />
</PanelGroup>
        

For a complete list of supported properties and example usage, refer to the docs.

0.0.55

27 Jan 19:54
Compare
Choose a tag to compare
  • New units prop added to PanelGroup to support pixel-based panel size constraints.

This prop defaults to "percentage" but can be set to "pixels" for static, pixel based layout constraints.

This can be used to add enable pixel-based min/max and default size values, e.g.:

<PanelGroup direction="horizontal" units="pixels">
  {/* Will be constrained to 100-200 pixels (assuming group is large enough to permit this) */}
  <Panel minSize={100} maxSize={200} />
  <PanelResizeHandle />
  <Panel />
  <PanelResizeHandle />
  <Panel />
</PanelGroup>

Imperative API methods are also able to work with either pixels or percentages now. They default to whatever units the group has been configured to use, but can be overridden with an additional, optional parameter, e.g.

panelRef.resize(100, "pixels");
panelGroupRef.setLayout([25, 50, 25], "percentages");

// Works for getters too, e.g.
const percentage = panelRef.getSize("percentages");
const pixels = panelRef.getSize("pixels");

const layout = panelGroupRef.getLayout("pixels");

0.0.54

15 Jul 18:27
Compare
Choose a tag to compare
  • 172: Development warning added to PanelGroup for conditionally-rendered Panel(s) that don't have id and order props
  • 156: Package exports now used to select between node (server-rendering) and browser (client-rendering) bundles

0.0.53

25 Jun 17:55
Compare
Choose a tag to compare
  • Fix edge case race condition for onResize callbacks during initial mount

0.0.52

24 Jun 03:50
Compare
Choose a tag to compare
  • 162: Add Panel.collapsedSize property to allow panels to be collapsed to custom, non-0 sizes
  • 161: Bug fix: onResize should be called for the initial Panel size regardless of the onLayout prop

0.0.51

11 Jun 15:11
Compare
Choose a tag to compare
  • 154: onResize and onCollapse props are called in response to PanelGroup.setLayout
  • 123: onResize called when number of panels in a group change due to conditional rendering