Skip to content

Commit 132b145

Browse files
Merge pull request #66 from y4ure/fix/react-localstorage
fix: Prevent React panel group data from being saved to local storage when autosaveId is not set
2 parents bb02be9 + 77ab770 commit 132b145

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)