Skip to content

[Templates] Fix StreamRender error occurring in certain situations #3090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -2,17 +2,17 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<RuntimeVersion8>8.0.0</RuntimeVersion8>
<AspNetCoreVersion8>8.0.10</AspNetCoreVersion8>
<EfCoreVersion8>8.0.10</EfCoreVersion8>
<AspNetCoreVersion8>8.0.11</AspNetCoreVersion8>
<EfCoreVersion8>8.0.11</EfCoreVersion8>
<RuntimeVersion9>9.0.0</RuntimeVersion9>
<AspNetCoreVersion9>9.0.0</AspNetCoreVersion9>
<EfCoreVersion9>9.0.0</EfCoreVersion9>
</PropertyGroup>
<ItemGroup>
<!-- For Sample Apps -->
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.11.0-beta.1" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" version="4.11.0-beta.1" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Emoji" Version="4.11.0-beta.1" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.11.0" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" version="4.11.0" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Emoji" Version="4.11.0" />
<!-- Test dependencies -->
<PackageVersion Include="bunit" Version="1.31.3" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
Original file line number Diff line number Diff line change
@@ -9,29 +9,29 @@

<p>This component demonstrates showing data.</p>

@*#if (InteractiveAtRoot) -->
@if (forecasts == null)
{
<p><em>Loading...</em></p>
}
else
{
@*#if (InteractiveAtRoot) -->
<FluentDataGrid Id="weathergrid" Items="@forecasts" GridTemplateColumns="1fr 1fr 1fr 2fr" TGridItem="WeatherForecast">
<PropertyColumn Title="Date" Property="@(c => c!.Date)" Sortable="true" Align="Align.Start"/>
<PropertyColumn Title="Temp. (C)" Property="@(c => c!.TemperatureC)" Sortable="true" Align="Align.Center"/>
<PropertyColumn Title="Temp. (F)" Property="@(c => c!.TemperatureF)" Sortable="true" Align="Align.Center"/>
<PropertyColumn Title="Summary" Property="@(c => c!.Summary)" Sortable="true" Align="Align.End"/>
</FluentDataGrid>
##else
<!-- This page is rendered in SSR mode, so the FluentDataGrid component does not offer any interactivity (like sorting). -->
<FluentDataGrid Id="weathergrid" Items="@forecasts" GridTemplateColumns="1fr 1fr 1fr 2fr" TGridItem="WeatherForecast">
<PropertyColumn Title="Date" Property="@(c => c!.Date)" Align="Align.Start"/>
<PropertyColumn Title="Temp. (C)" Property="@(c => c!.TemperatureC)" Align="Align.Center"/>
<PropertyColumn Title="Temp. (F)" Property="@(c => c!.TemperatureF)" Align="Align.Center"/>
<PropertyColumn Title="Summary" Property="@(c => c!.Summary)" Align="Align.End"/>
</FluentDataGrid>
##endif*@
}
##else
<!-- This page is rendered in SSR mode, so the FluentDataGrid component does not offer any interactivity (like sorting). -->
<FluentDataGrid Id="weathergrid" Items="@forecasts" GridTemplateColumns="1fr 1fr 1fr 2fr" Loading="@(forecasts == null)" Style="height:204px;" TGridItem="WeatherForecast">
<PropertyColumn Title="Date" Property="@(c => c!.Date)" Align="Align.Start"/>
<PropertyColumn Title="Temp. (C)" Property="@(c => c!.TemperatureC)" Align="Align.Center"/>
<PropertyColumn Title="Temp. (F)" Property="@(c => c!.TemperatureF)" Align="Align.Center"/>
<PropertyColumn Title="Summary" Property="@(c => c!.Summary)" Align="Align.End"/>
</FluentDataGrid>
##endif*@

@code {
private IQueryable<WeatherForecast>? forecasts;
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@

<p>This component demonstrates showing data.</p>

@*#if (InteractiveAtRoot) -->
@if (forecasts == null)
{
<p><em>Loading...</em></p>
@@ -22,6 +23,16 @@ else
<PropertyColumn Title="Summary" Property="@(c => c!.Summary)" Sortable="true" Align="Align.End"/>
</FluentDataGrid>
}
##else
<!-- This page is rendered in SSR mode, so the FluentDataGrid component does not offer any interactivity (like sorting). -->
<FluentDataGrid Id="weathergrid" Items="@forecasts" GridTemplateColumns="1fr 1fr 1fr 2fr" Loading="@(forecasts == null)" Style="height:204px;" TGridItem="WeatherForecast">
<PropertyColumn Title="Date" Property="@(c => c!.Date)" Align="Align.Start"/>
<PropertyColumn Title="Temp. (C)" Property="@(c => c!.TemperatureC)" Align="Align.Center"/>
<PropertyColumn Title="Temp. (F)" Property="@(c => c!.TemperatureF)" Align="Align.Center"/>
<PropertyColumn Title="Summary" Property="@(c => c!.Summary)" Align="Align.End"/>
</FluentDataGrid>
##endif*@


@code {
private IQueryable<WeatherForecast>? forecasts;
Loading