function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jenBjenB 

LWC: Pass data from the ORG to a button that will open a modal.

Hello everyone,
Currently I am working in a LWC component, it is a search bar that has to show the object USER togethether with the Metadata: GROUP and GROUPMEMBERS, so the results from the search bar depending on what the user looks for will be: the USER or the GROUPS that exist in the org, I've added an edit button next to each result, because once I click the result I should be able to open a popup that shows me info about what groups from the org the user belong too. Inside of the popup I also have to add a dualpickList where in the left colum contains all the group from the org and the right one shows me all the groups that the user belongs too, so I can easily add or remove this user from the different groups of the ORG. My code has 3 LWC components for the moment: searchBar, modalPopUp and dualPicklist. So in my logic I call all the data to searchBar, making it the parent component, inside this I've nestted the <c-modal-pop-up>and inside the modalPopUP the pickList is added. But I am struggling undertanding how to pass the data between components, when there's an Edit button, because normally the button should grab all the data, but in LWC I noticed I can add the data between the components 
<c-modal-pop-up>data</c-modal-pop-up>
so I'm not understanding how can I get all the data and open the modal pop up, in addition too I want to add this data to the pickList and can't figure it out, I assume I should write inside de modalPopUp.html
<c-dual-pick-list>data</dual-pick-list>
but it is not working.

Thank you all for your attention and advice.