dotnet / dotnet/aspnetcore

Capture references to multiple similar child-components

Open
#13,358 16 comments 4 reactions 0 assignees View on GitHub
affected-few area-blazor enhancement feature-razor.language Pillar: Complete Blazor Web severity-minor
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

I was searching for documentation on how to capture references to child-components based on for-each creation.
Let's say I have a parent-component which itereates a collection to create multiple child-components:

```
@foreach (var singleDataPiece in aCollectionOfData)
{

}
```

I would like to call a method on one of these sub-components, identified by its id-value. Would you consider adding documentation on this scenario?

Many thanks in advance for your consideration.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.