@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?
yes, this is the component
(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"})))))))
the transact is triggered in the click event
#(om/transact!
this
`[(form-sidebar/set-dropdown
{:dropdown-item :rounds})
:update-sidebar-dropdowns])
and the component contains the query :update-sidebar-dropdown