Reputation: 153
According to the MudTable documentation:
Specifying int.MaxValue in the PageSizeOptions will render as "All" in the Page Size dropdown.
On the documentation page it works, and doing a "Run" also shows "All" in the dropdown. In my own code aswell as in the latest MudBlazor Visual Studio template however it does not and just shows 2147483647.
<MudTable Items="forecasts" >
<HeaderContent>
<MudTh><MudTableSortLabel InitialDirection="SortDirection.Ascending" SortBy="new Func<WeatherForecast, object>(x=>x.Date)">Date</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<WeatherForecast, object>(x=>x.TemperatureC)">Temp. (C)</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<WeatherForecast, object>(x=>x.TemperatureF)">Temp. (F)</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<WeatherForecast, object>(x=>x.Summary!)">Summary</MudTableSortLabel></MudTh>
</HeaderContent>
<RowTemplate>
<MudTd DataLabel="Date">@context.Date</MudTd>
<MudTd DataLabel="Temp. (C)">@context.TemperatureC</MudTd>
<MudTd DataLabel="Temp. (F)">@context.TemperatureF</MudTd>
<MudTd DataLabel="Summary">@context.Summary</MudTd>
</RowTemplate>
<PagerContent>
<MudTablePager PageSizeOptions="new int[] { 10, 25, 50, 100, int.MaxValue }" />
</PagerContent>
</MudTable>
Does anyone know how to fix this?
Upvotes: 1
Views: 357
Reputation: 153
I installed the most recent template a couple of days ago. Turns out this is based on version 6.0.13. After updating it to 6.2.2 it now works.
Upvotes: 1