Fix toggle-amount-mode: properly update request state with converted accounts and new mode
The assoc-in call had too many arguments, so the request state wasn't being updated with the new mode or converted accounts. Using -> threading with separate assoc-in calls ensures both the accounts and mode are properly set before re-rendering the grid.
This commit is contained in:
@@ -362,8 +362,9 @@
|
|||||||
accounts (convert-accounts-mode (:transaction/accounts snapshot) old-mode new-mode total)]
|
accounts (convert-accounts-mode (:transaction/accounts snapshot) old-mode new-mode total)]
|
||||||
(html-response
|
(html-response
|
||||||
[:div#account-grid-body
|
[:div#account-grid-body
|
||||||
(account-grid-body* (assoc-in request [:multi-form-state :snapshot :transaction/accounts] accounts
|
(account-grid-body* (-> request
|
||||||
[:multi-form-state :snapshot :amount-mode] new-mode))])))
|
(assoc-in [:multi-form-state :snapshot :transaction/accounts] accounts)
|
||||||
|
(assoc-in [:multi-form-state :snapshot :amount-mode] new-mode)))])))
|
||||||
|
|
||||||
(defrecord BasicDetailsStep [linear-wizard]
|
(defrecord BasicDetailsStep [linear-wizard]
|
||||||
mm/ModalWizardStep
|
mm/ModalWizardStep
|
||||||
|
|||||||
Reference in New Issue
Block a user