Skip to content

Commit ed838ba

Browse files
authored
doc(AutoFill): throw exception when clear selected item (#6912)
1 parent 453e98d commit ed838ba

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/BootstrapBlazor.Server/Components/Samples/AutoFills.razor

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@
2424
</ItemTemplate>
2525
</AutoFill>
2626
<section ignore>
27-
<img src="@WebsiteOption.Value.GetAvatarUrl(Model1.Id)" class="shadow" style="width: 140px; margin-bottom: 1rem; border-radius: 6px;" />
28-
<EditorForm Model="@Model1" RowType="RowType.Inline" ItemsPerRow="2" />
27+
@if (Model1 != null)
28+
{
29+
<img src="@WebsiteOption.Value.GetAvatarUrl(Model1.Id)" class="shadow" style="width: 140px; margin-bottom: 1rem; border-radius: 6px;" />
30+
<EditorForm Model="@Model1" RowType="RowType.Inline" ItemsPerRow="2" />
31+
}
2932
</section>
3033
</DemoBlock>
3134

@@ -46,7 +49,10 @@
4649
</ItemTemplate>
4750
</AutoFill>
4851
<section ignore>
49-
<EditorForm Model="@Model2" RowType="RowType.Inline" ItemsPerRow="2" />
52+
@if (Model2 != null)
53+
{
54+
<EditorForm Model="@Model2" RowType="RowType.Inline" ItemsPerRow="2" />
55+
}
5056
</section>
5157
</DemoBlock>
5258

@@ -68,7 +74,10 @@
6874
</ItemTemplate>
6975
</AutoFill>
7076
<section ignore>
71-
<EditorForm Model="@Model3" RowType="RowType.Inline" ItemsPerRow="2" />
77+
@if (Model3 != null)
78+
{
79+
<EditorForm Model="@Model3" RowType="RowType.Inline" ItemsPerRow="2" />
80+
}
7281
</section>
7382
</DemoBlock>
7483

0 commit comments

Comments
 (0)