Skip to content

Commit e89fe2d

Browse files
committed
Trigger streaming.
1 parent 6e3eb98 commit e89fe2d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/Components/test/testassets/Components.TestServer/RazorComponents/Pages/NotFound/RedirectionNotFound-SSR-streaming.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
@page "/reexecution/redirection-not-found-ssr-streaming"
33
@attribute [StreamRendering(true)]
44

5-
<Components.WasmMinimal.Pages.NotFound.RedirectionNotFoundComponent />
5+
<Components.WasmMinimal.Pages.NotFound.RedirectionNotFoundComponent StartStreaming="true" />

src/Components/test/testassets/Components.WasmMinimal/Pages/NotFound/RedirectionNotFoundComponent.razor

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,17 @@
1313
[SupplyParameterFromQuery(Name = "navigate-programmatically")]
1414
public bool? NavigateProgrammatically { get; set; }
1515

16+
[Parameter]
17+
public bool StartStreaming { get; set; } = false;
18+
1619
private string _nonExistingPath = string.Empty;
1720

18-
protected override void OnInitialized()
21+
protected override async Task OnInitializedAsync()
1922
{
23+
if (StartStreaming)
24+
{
25+
await Task.Yield();
26+
}
2027
_nonExistingPath = $"{NavigationManager.BaseUri}reexecution/not-existing-page";
2128
if (NavigateProgrammatically == true)
2229
{

0 commit comments

Comments
 (0)