Skip to content

Commit 341ffda

Browse files
authored
fix(Table): ItemChangedType doesn't pass correct value to EditTemplate on Drawer mode (#4750)
* feat(Table): add cascade value ItemChagnedType for edit template * chore: bump version 9.0.2-beta04
1 parent 81e8297 commit 341ffda

File tree

2 files changed

+22
-20
lines changed

2 files changed

+22
-20
lines changed

src/BootstrapBlazor/BootstrapBlazor.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>9.0.2-beta03</Version>
4+
<Version>9.0.2-beta04</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

src/BootstrapBlazor/Components/Dialog/EditDialog.razor

+21-19
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,26 @@
44
@attribute [BootstrapModuleAutoLoader("Dialog/EditDialog.razor.js", AutoInvokeInit = false, AutoInvokeDispose = false)]
55

66
<ValidateForm Model="@Model" OnValidSubmit="@OnValidSubmitAsync" DisableAutoSubmitFormByEnter="@DisableAutoSubmitFormByEnter">
7-
@if (BodyTemplate != null)
8-
{
9-
<div class="form-body">
10-
@BodyTemplate(Model)
11-
</div>
12-
<div class="form-footer">
13-
@RenderFooter
14-
</div>
15-
}
16-
else
17-
{
18-
<EditorForm TModel="TModel" Items="Items" ItemChangedType="ItemChangedType" ItemsPerRow="ItemsPerRow" RowType="RowType" LabelAlign="LabelAlign" ShowLabel="ShowLabel" ShowUnsetGroupItemsOnTop="ShowUnsetGroupItemsOnTop">
19-
<Buttons>
7+
<CascadingValue Value="ItemChangedType" IsFixed="true">
8+
@if (BodyTemplate != null)
9+
{
10+
<div class="form-body">
11+
@BodyTemplate(Model)
12+
</div>
13+
<div class="form-footer">
2014
@RenderFooter
21-
</Buttons>
22-
</EditorForm>
23-
}
24-
<div class="form-loader fade" id="@Id">
25-
<Spinner Color="Color.Primary" />
26-
</div>
15+
</div>
16+
}
17+
else
18+
{
19+
<EditorForm TModel="TModel" Items="Items" ItemChangedType="ItemChangedType" ItemsPerRow="ItemsPerRow" RowType="RowType" LabelAlign="LabelAlign" ShowLabel="ShowLabel" ShowUnsetGroupItemsOnTop="ShowUnsetGroupItemsOnTop">
20+
<Buttons>
21+
@RenderFooter
22+
</Buttons>
23+
</EditorForm>
24+
}
25+
<div class="form-loader fade" id="@Id">
26+
<Spinner Color="Color.Primary" />
27+
</div>
28+
</CascadingValue>
2729
</ValidateForm>

0 commit comments

Comments
 (0)