Surface plan for Blazor generic type constraints (#17350)
parent
84d6b07648
commit
ba9016c94d
|
@ -5,7 +5,7 @@ description: Learn how templated components can accept one or more UI templates
|
|||
monikerRange: '>= aspnetcore-3.1'
|
||||
ms.author: riande
|
||||
ms.custom: mvc
|
||||
ms.date: 02/12/2020
|
||||
ms.date: 03/18/2020
|
||||
no-loc: [Blazor, SignalR]
|
||||
uid: blazor/templated-components
|
||||
---
|
||||
|
@ -41,6 +41,9 @@ When using a templated component, the template parameters can be specified using
|
|||
</TableTemplate>
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> Generic type constraints will be supported in a future release. For more information, see [Allow generic type constraints (dotnet/aspnetcore #8433)](https://github.com/dotnet/aspnetcore/issues/8433).
|
||||
|
||||
## Template context parameters
|
||||
|
||||
Component arguments of type `RenderFragment<T>` passed as elements have an implicit parameter named `context` (for example from the preceding code sample, `@context.PetId`), but you can change the parameter name using the `Context` attribute on the child element. In the following example, the `RowTemplate` element's `Context` attribute specifies the `pet` parameter:
|
||||
|
|
Loading…
Reference in New Issue