Closed kokjinsam closed 9 years ago
You should traverse the tree of components using childrenComponents
or parentComponent
methods (possibly calling it recursively), finding the component you want, and calling a method on it.
Where exactly you want to call it from outside a component? In general you simply have to have a reference to the component. You can store it somewhere, for example. You can also use getComponentForElement
to get a component from a DOM element.
See also #81 and #82.
Hi,
I have been exploring this awesome package for two weeks now. It's awesome! Thanks for your hard work!
Due to the fact I'm still new to this package, please excuse my noobiness. How do I access a component method outside of the component? For example, I have a
hide()
function inheaderComponent
and I want to use the hide function fromcontentComponent
. How do I do that?and if I want to use the hide function from a non BC, how should I do that?