• jenB
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies

I am creating a LWC, for the moment I have created a Wrapper class in Apex, where I call different objects (user,group,groupMember) from the the ORG. I use this data in a parent component named searchBar, once the data is located in the searchbar UI I have a button that opens a popup. So here is where I get stuck, when I click the button to open the modalPopUp I want to pass the data from the clicked result, but also in the modal I have another component called dualList where I want to be able to call all the data from the parent component searchBar. Is there a way to tackle this?  
  • September 10, 2021
  • Like
  • 0
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.
  • September 09, 2021
  • Like
  • 0