IvanJosipovic / BlazorTable

Blazor Table Component with Sorting, Paging and Filtering
https://BlazorTable.netlify.app
MIT License
540 stars 109 forks source link

[Feat] Add support for .NET 6 cascading type parameters #371

Open conficient opened 2 years ago

conficient commented 2 years ago

In .NET 6 Blazor now supports cascading generic type parameters

This helps to remove all the TableItem boilerplate we currently need in earlier versions. Will require multi-targeting of the BlazorTable package for NET 6 and prior versions to support this.

Example: in the samples all columns need the TableItem

<Column TableItem="PersonData" ...>

With the new feature we can add

@attribute [CascadingTypeParameter(nameof(TableItem))]

in the Table.razor file. Then the column HTML would be:

<Column  ...>