Skip to content

Commit

Permalink
Refactored Panel/PanelGroup to better work with strict effects mode
Browse files Browse the repository at this point in the history
  • Loading branch information
bvaughn committed Nov 20, 2023
1 parent f42a524 commit 0692526
Show file tree
Hide file tree
Showing 4 changed files with 227 additions and 178 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function UrlPanelGroupToData(
urlPanelGroup: ReactElement<PanelGroupProps>
): UrlPanelGroup {
return {
autoSaveId: urlPanelGroup.props.autoSaveId,
autoSaveId: urlPanelGroup.props.autoSaveId ?? undefined,
children: Children.toArray(urlPanelGroup.props.children).map((child) => {
if (isPanelElement(child)) {
return UrlPanelToData(child);
Expand Down
2 changes: 2 additions & 0 deletions packages/react-resizable-panels/src/Panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export function PanelWithForwardedRef({
expandPanel,
getPanelSize,
getPanelStyle,
groupId,
isPanelCollapsed,
registerPanel,
resizePanel,
Expand Down Expand Up @@ -250,6 +251,7 @@ export function PanelWithForwardedRef({
// CSS selectors
"data-panel": "",
"data-panel-id": panelId,
"data-panel-group-id": groupId,

// e2e test attributes
"data-panel-collapsible": isDevelopment
Expand Down
Loading

0 comments on commit 0692526

Please sign in to comment.