Skip to content

Commit 7a6958c

Browse files
committed
reactive.Value: add freeze() method
1 parent b517a53 commit 7a6958c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

shiny/reactive/_reactives.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ def is_set(self) -> bool:
8989
self._dependents.register()
9090
return not isinstance(self._value, MISSING_TYPE)
9191

92+
# Like unset(), except that this does not invalidate dependents.
93+
def freeze(self) -> None:
94+
self._value = MISSING
95+
9296

9397
# ==============================================================================
9498
# Calc

0 commit comments

Comments
 (0)