clear!
function is throwing an error when visible-messages is used as well
#11
-
Hello, We are trying to build a form with inside-out.
Here is an example of code to reproduce the behaviour : (defn reproducer
[]
(with-form [foo {:bar ?bar}]
[:<>
[:span (str @foo)]
[:span (forms/visible-messages foo)]
[:input {:on-change #(reset! ?bar (.. % -target -value))
:type :text
:value @?bar}]
[:input {:type :button
:value "clear"
:on-click #(forms/clear! foo)}]])) The code above throws the error when the button is clicked. However, if you comment the line This looks like a bug. What do you think about this ? Thank you very much for your help, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@alixbrunsperger thanks for the report! This was indeed a bug. Should be fixed now c71bc35. The bug was introduced when I optimised message-computation to happen inside a reaction (so that messages are cached and recomputed when necessary). |
Beta Was this translation helpful? Give feedback.
@alixbrunsperger thanks for the report! This was indeed a bug. Should be fixed now c71bc35.
The bug was introduced when I optimised message-computation to happen inside a reaction (so that messages are cached and recomputed when necessary).