This question already has an answer here:
I have Lightning Parent component that has three inner Lightning components:
<aura:component> <c:searchComponent/> <c:newRequest/> <c:requestsList/> <aura:component>
c:newRequest component has several force:inputField components to display fields for New Request. Based on search query in c:searchComponent I want to show/hide c:newRequest or c:requestList. To implement that I added new event to call function with addClass/removeClass. Markup:
<aura:component> <c:searchComponent/> <div aura:id="newRequest"> <c:newRequest/> </div> <div aura:id="requestsList"> <c:requestsList/> </div> <aura:component>
Toggle logic works great but now I can't see force:inputField components! I tried to remove div aura:id="newRequest" and force:inputField components displayed correctly. Is that Lightning issue? What is the best practice to handle similar functionality?