❔ Blazor - Get objects from child components
I have a page called "FactorSearch", that calls 2 instances of the same component, called "scope". Scope has 4 properties: Region, Universe, StartDate, EndDate.
What I'm trying to do is, when I click "GetScope", I get an instance of the object Scope filled with the informations within each of the instances I created.
Been trying to search about it but no success.
Thanks!
2 Replies
In your page, create 2 reference variables correlating to that component you would want to initialize and add a @ ref to them
So something like
Note that this can cause performance issues depending on how tightly coupled you want your component to be to your parent
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.