Skip to content

Commit 77ab770

Browse files
committed
fix: Prevent React panel group data from being saved to local storage when autosaveId is unset
1 parent bb02be9 commit 77ab770

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react/src/ReactWindowSplitter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ const PanelGroupImpl = React.forwardRef<
338338
>(function PanelGroupImpl(
339339
{
340340
autosaveId,
341-
autosaveStrategy = "localStorage",
341+
autosaveStrategy = autosaveId ? "localStorage" : undefined,
342342
snapshot: snapshotProp,
343343
initialItems,
344344
shiftAmount,

0 commit comments

Comments
 (0)