Closed
Description
Is your feature request related to a problem? Please describe.
If you have a templated component, that's Generic and uses @typeparam, if you want to add other child components, you also have to specify the type when you declare them. For instance in a Grid:
<Grid Data=List<Item>>
<Columns>
<Column TItem=Item>
<Template />
</Column>
</Columns>
</Grid>
In this setup, in order to have a strongly typed context passed to the Column templates, you have to specify explicitly TItem to each Column and cannot be inferred by the List.
Describe the solution you'd like
With the current setup we can pass simple parameters down to child components with:
<CascadingValue Value=this>
@Columns
</CascadingValue>
I would like to have the ability to aslo pass down @typeparam values. Perhaps something like:
<CascadingType Value=TItem>
@Columns
</CascadingType>
And if the child component declares it's own TItem, it will override the Cascading value.
Metadata
Metadata
Assignees
Labels
This issue tracks a big effort which can span multiple issuesThis issue requires design work before implementating.This issue impacts only small number of customersIncludes: Blazor, Razor ComponentsIndicates an issue which also has impact on 3rd party component ecosystemThis issue represents an ask for new feature or an enhancement to an existing oneThis label is used by an internal tool