fixed error.
This commit is contained in:
@@ -125,7 +125,6 @@
|
|||||||
]
|
]
|
||||||
(r/create-class
|
(r/create-class
|
||||||
{:reagent-render (fn [{:keys [matches on-change disabled match->text field value class not-found-description]}]
|
{:reagent-render (fn [{:keys [matches on-change disabled match->text field value class not-found-description]}]
|
||||||
(println "RENDERING ZZ" value)
|
|
||||||
(let [select (fn [entity]
|
(let [select (fn [entity]
|
||||||
(when on-change
|
(when on-change
|
||||||
(if (= :not-found entity)
|
(if (= :not-found entity)
|
||||||
@@ -134,7 +133,7 @@
|
|||||||
text-atom text
|
text-atom text
|
||||||
text (or (when value (match->text value)) @text)
|
text (or (when value (match->text value)) @text)
|
||||||
valid-matches (get-valid-entity-matches matches not-found-description not-found-value text match->text)]
|
valid-matches (get-valid-entity-matches matches not-found-description not-found-value text match->text)]
|
||||||
(println "TEXT" value (match->text value) text)
|
|
||||||
[:div.typeahead
|
[:div.typeahead
|
||||||
(if disabled
|
(if disabled
|
||||||
|
|
||||||
|
|||||||
@@ -101,6 +101,15 @@
|
|||||||
submit-query)
|
submit-query)
|
||||||
|
|
||||||
;; EVENTS
|
;; EVENTS
|
||||||
|
|
||||||
|
(re-frame/reg-event-db
|
||||||
|
::adding
|
||||||
|
(fn [db [_ new]]
|
||||||
|
(let [locations @(re-frame/subscribe [::subs/locations-for-client (:client-id new)])]
|
||||||
|
(-> db (forms/start-form ::form (assoc new :expense-accounts
|
||||||
|
(expense-accounts-field/from-graphql (:expense-accounts new)
|
||||||
|
0.0
|
||||||
|
locations)))))))
|
||||||
(re-frame/reg-event-db
|
(re-frame/reg-event-db
|
||||||
::editing
|
::editing
|
||||||
(fn [db [_ which]]
|
(fn [db [_ which]]
|
||||||
|
|||||||
Reference in New Issue
Block a user