Aha are there multiple instances of RoundDropDown
?
no, just one, and there are other components using :update-sidebar-dropdown
which key does :update-sidebar-dropdown live under?
My actual question is: what is your root query?
the root query, actually, the rootview node is composed by the tree components
here is the tree components:
(defui RootView
static om/IQuery
(query
[_]
[ :update-form :header :report :session :selected-tab])
...)
the root contains the update-form and report, then update-form contains content and sidebar:
(defui UpdateForm
static om/IQuery
(query
[_]
{:update-form/sidebar (om/get-query sidebar/Sidebar)
:update-form/content (om/get-query FormContent)})
...)
the sidebar contains multiple components which includes RoundDropDown:
(defui Sidebar
static om/IQuery
(query
[_]
[:selected-round
:loading
:section-responsible
{:roundDropdown (om/get-query RoundDropDown)
:countryDropdown (om/get-query CountryDropDown)
:sectionResponsibleDropdown (om/get-query SectionResponsibleDropDown)
:sectionResponsibleList (om/get-query SectionResponsibleList)}])
...)
RoundDropDown, CountryDropDown and SectionResponsibleDropDown need to use the :update-sidebar-dropdown
Your rootview is missing the query and all queries should compose to root so this cannot work correctly
what do you mean? should I pass all the children components' queries to the rootview?
then pass the queries' values to its child components? how can it be done?
@mitchelkuijpers thanks for your suggestion, I solved the problem by adding the query in the rootview to transact!, but I do not understand to update all the related components, why must the query be in the rootview?