我有一个用MudBlazor制作的表格:
<MudTable ServerData="@(new Func<TableState, Task<TableData<DossierInfo>>>(GetServerData))"
RowsPerPage="@_PageSize"
Dense="true"
Hover="true"
Bordered="false"
Striped="true"
Outlined="true"
Filter="new Func<DossierInfo,bool>(FilterFunc)" Elevation="0">
<ToolBarContent>
<MudTextField @bind-Value="searchString" Label="Ricerca" Placeholder="Digitare il testo da ricercare" Variant="Variant.Filled" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Search" />
<!--<MudTextField @bind-Value="searchString" Placeholder="Search" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium"></MudTextField>-->
</ToolBarContent>
<HeaderContent>
<MudTh>Tipo</MudTh>
<MudTh>Nr</MudTh>
<MudTh>Targa</MudTh>
<MudTh>Tipo veicolo</MudTh>
<MudTh>Marca</MudTh>
<MudTh>Modello</MudTh>
<MudTh>Km</MudTh>
<MudTh>Totale validato</MudTh>
<MudTh>Data apertura OL</MudTh>
<MudTh></MudTh>
</HeaderContent>
<RowTemplate>
<MudTd DataLabel="Tipo pratica"><MudIcon Icon="@DossierTypeIconService.GetDossierTypeIcon(context.Type)"></MudIcon></MudTd>
<MudTd DataLabel="Numero">@context.Number</MudTd>
<MudTd DataLabel="Targa">@context.VehiclePlate</MudTd>
<MudTd DataLabel="Tipo veicolo">@context.VehicleType</MudTd>
<MudTd DataLabel="Marca">@context.VehicleMake</MudTd>
<MudTd DataLabel="Modello">@context.VehicleModel</MudTd>
<MudTd DataLabel="Km">@context.VehicleKm</MudTd>
<MudTd DataLabel="Totale validato">@context.ValidatedTotalAmount</MudTd>
<MudTd DataLabel="Data apertura OL">@context.OpenedDate</MudTd>
<MudTd DataLabel="Azioni" Style="text-align:right">
<MudButton Variant="Variant.Filled" DisableElevation="true" Color="Color.Primary" Size="Size.Small" OnClick="@((e) => ToDossierDetail(@context.Id))"><strong>Apri</strong></MudButton>
</MudTd>
</RowTemplate>
<PagerContent>
<MudTablePager PageSizeOptions="@_pageSizeOption" RowsPerPageString="Pratiche per pagina" />
</PagerContent>
我不知道是否可行,但我希望使表中的每一行都可以完全点击以访问每个档案的信息,而不是像现在这样使用MudButton。我在主要的MudBlazor网站上搜索了一下,但没找到任何关于此的内容。