You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .changeset/clear-path-on-unmount.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,8 @@
2
2
"leva": minor
3
3
---
4
4
5
-
Add `clearOnUnmount` option to remove inputs from the store when their component unmounts.
5
+
Add `clearOnUnmount` option and `store.clearPath`to remove inputs from the store when their component unmounts.
6
6
7
+
-`store.clearPath(path)` — new method to imperatively remove a single input from the store.
7
8
-`InputOptions.clearOnUnmount` — per-input flag; when `true` the input is removed from the store on unmount.
8
9
-`LevaRootProps.clearOnUnmount` — panel-level flag; when `true` all inputs managed by that panel are cleared on unmount, overriding the per-input setting.
0 commit comments