-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
With the re-framing example, everything is handled through the events function:
(def events
{:get (fn [path] @(re-frame/subscribe [:value path]))
:save! (fn [path value] (re-frame/dispatch [:set-value path value]))
:update! (fn [path save-fn value]
; save-fn should accept two arguments: old-value, new-value
(re-frame/dispatch [:update-value save-fn path value]))
:doc (fn [] @(re-frame/subscribe [:doc]))})
This works fine for initializing and updating values but what if we wanted to calculate the value of a non-editable field (similar to the BMI example). I have a field that comes from the backend that is non-editable and I want to show the calculation of that field to the user before sending it back over. Is there a way to update a specific field in the doc outside of the the events function setup?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels