|
9 | 9 |
|
10 | 10 | <p>This component demonstrates showing data.</p>
|
11 | 11 |
|
| 12 | +@*#if (InteractiveAtRoot) --> |
12 | 13 | @if (forecasts == null)
|
13 | 14 | {
|
14 | 15 | <p><em>Loading...</em></p>
|
15 | 16 | }
|
16 | 17 | else
|
17 | 18 | {
|
18 |
| - @*#if (InteractiveAtRoot) --> |
19 | 19 | <FluentDataGrid Id="weathergrid" Items="@forecasts" GridTemplateColumns="1fr 1fr 1fr 2fr" TGridItem="WeatherForecast">
|
20 | 20 | <PropertyColumn Title="Date" Property="@(c => c!.Date)" Sortable="true" Align="Align.Start"/>
|
21 | 21 | <PropertyColumn Title="Temp. (C)" Property="@(c => c!.TemperatureC)" Sortable="true" Align="Align.Center"/>
|
22 | 22 | <PropertyColumn Title="Temp. (F)" Property="@(c => c!.TemperatureF)" Sortable="true" Align="Align.Center"/>
|
23 | 23 | <PropertyColumn Title="Summary" Property="@(c => c!.Summary)" Sortable="true" Align="Align.End"/>
|
24 | 24 | </FluentDataGrid>
|
25 |
| - ##else |
26 |
| - <!-- This page is rendered in SSR mode, so the FluentDataGrid component does not offer any interactivity (like sorting). --> |
27 |
| - <FluentDataGrid Id="weathergrid" Items="@forecasts" GridTemplateColumns="1fr 1fr 1fr 2fr" TGridItem="WeatherForecast"> |
28 |
| - <PropertyColumn Title="Date" Property="@(c => c!.Date)" Align="Align.Start"/> |
29 |
| - <PropertyColumn Title="Temp. (C)" Property="@(c => c!.TemperatureC)" Align="Align.Center"/> |
30 |
| - <PropertyColumn Title="Temp. (F)" Property="@(c => c!.TemperatureF)" Align="Align.Center"/> |
31 |
| - <PropertyColumn Title="Summary" Property="@(c => c!.Summary)" Align="Align.End"/> |
32 |
| - </FluentDataGrid> |
33 |
| - ##endif*@ |
34 | 25 | }
|
| 26 | +##else |
| 27 | +<!-- This page is rendered in SSR mode, so the FluentDataGrid component does not offer any interactivity (like sorting). --> |
| 28 | +<FluentDataGrid Id="weathergrid" Items="@forecasts" GridTemplateColumns="1fr 1fr 1fr 2fr" Loading="@(forecasts == null)" Style="height:204px;" TGridItem="WeatherForecast"> |
| 29 | + <PropertyColumn Title="Date" Property="@(c => c!.Date)" Align="Align.Start"/> |
| 30 | + <PropertyColumn Title="Temp. (C)" Property="@(c => c!.TemperatureC)" Align="Align.Center"/> |
| 31 | + <PropertyColumn Title="Temp. (F)" Property="@(c => c!.TemperatureF)" Align="Align.Center"/> |
| 32 | + <PropertyColumn Title="Summary" Property="@(c => c!.Summary)" Align="Align.End"/> |
| 33 | +</FluentDataGrid> |
| 34 | +##endif*@ |
35 | 35 |
|
36 | 36 | @code {
|
37 | 37 | private IQueryable<WeatherForecast>? forecasts;
|
|
0 commit comments