Adress canvas group within a clone of prefab

I have a group of UI elements as a prefab, i am rendering/cloning this prefab in a ScrollView an x amount of times from a loop. The prefab has many children, one of which is a Panel with the CanvasGroup component.

I have a button (also a child of the same prefab) and i have an event listener on it.

newInventoryItem.GetComponent<Button>().onClick.AddListener(() => ItemMenuOpener());

Inside the ItemMenuOpener() i need to address and change the parameters of the CanvasGroup component of the panel in the same prefab on which the button has been clicked. How would that be possible? Thank you in advance!

Try this code

newInventoryItem.transform.Find("buttonName").GetComponent<Button>().onClick.AddListener(()=> ItemMenuOpener());

After a lot of experimentation i found a solution. It turned out to be far simpler than i expected:

newInventoryItem.GetComponent<Button>().onClick.AddListener(() => CardMenuOpener(newCard.GetComponentInChildren<CanvasGroup>()));

I’m simply passing down the component to the Event Listener.