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
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@
2
2
"leva": minor
3
3
---
4
4
5
-
Add `clearOnUnmount` option and `store.clearPath` to remove inputs from the store when their component unmounts.
5
+
Add `clearOnUnmount` option and `store.clearPath` to discard cached input values when they are no longer in use.
6
6
7
-
-`store.clearPath(path)` — new method to imperatively remove a single input from the store.
8
-
-`InputOptions.clearOnUnmount` — per-input flag; when `true` the inputis removed from the store on unmount.
9
-
-`LevaRootProps.clearOnUnmount` — panel-level flag; when `true` all inputs managed by that panel are cleared on unmount, overriding the per-input setting.
7
+
-`store.clearPath(path)` — new method to imperatively discard the cached value of an input that is no longer mounted.
8
+
-`InputOptions.clearOnUnmount` — per-input flag; when `true` the input's cached value is discarded from the store on unmount.
9
+
-`LevaRootProps.clearOnUnmount` — panel-level flag; when `true` all inputs managed by that panel have their cached values discarded on unmount, overriding the per-input setting.
0 commit comments