This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-17
Channels
- # aleph (3)
- # bangalore-clj (2)
- # beginners (76)
- # boot (37)
- # braid-chat (7)
- # business (1)
- # clara (1)
- # cljsrn (45)
- # clojure (36)
- # clojure-android (1)
- # clojure-austin (2)
- # clojure-dusseldorf (4)
- # clojure-spec (2)
- # clojure-uk (2)
- # clojurebridge-ams (4)
- # clojurescript (79)
- # clr (1)
- # community-development (5)
- # core-async (1)
- # cursive (4)
- # data-science (1)
- # funcool (3)
- # hoplon (3)
- # om (107)
- # om-next (6)
- # other-lisps (1)
- # overtone (1)
- # planck (2)
- # reagent (24)
- # rum (1)
- # specter (7)
- # yada (46)
@mitchelkuijpers hi, i have added the query on the transact!, and add the function to display the message in the shouldComponentUpdate to see if all the related components are updated. but it does not work, only the component which sent the transact updates and printout the message
Could you show me your transact! call?
(defui RoundDropDown
static om/IQuery
(query
[_]
[:rounds :selected-round :update-sidebar-dropdowns :loading])
Object
;; get rounds when loading this component
(shouldComponentUpdate
[this next-props next-state]
(helpers/d "round next props" )
(not= next-props (om/props this)))
(render
[this]
(let [{:keys [rounds selected-round update-sidebar-dropdowns loading]} (om/props this)
round (first (filter #(= (:id %) selected-round) rounds))]
(dom/div #js {:className "panel panel__form-rounds"}
(dom/div #js {:className "panel__form-button"}
(dom/button #js {:className "button"
:onClick #(om/transact!
this
`[(form-sidebar/set-dropdown
{:dropdown-item :rounds})
:update-sidebar-dropdowns])}
(str (or (:label round) "Select round")
" ")
(dom/span #js {:className "caret"})))))))