Open masenf opened 1 week ago
As a workaround, it seems you can do self.computed_vars["dt"].mark_dirty(self)
π
generally speaking, it's hard to make this work all the time, what if the computed var was an object and doing .make_dirty
on it would result on that field itself like obj['make_dirty']
, in which case this operation isn't coherent
Describe the bug Because the computed var assigned to the State class isn't really a ComputedVar, but actually a ToOperation with a
_js_expr
based on the state, when_cache_attr
is accessed to delete it (inmark_dirty
), it returns the wrong attribute and doesn't actually clear the cache.To Reproduce
Expected behavior In reflex 0.5.10, each time the Reset Cache button is clicked, the timestamp updates.
In reflex 0.6.0, nothing happens.
Specifics (please complete the following information):
Additional context I think the
_cache_attr
should be based on some data intrinsic to theComputedVar
, not something that could be changed downstream by some operation