Skip to content

Commit 0bf5632

Browse files
committed
2.2.0.2
1 parent 8e14978 commit 0bf5632

8 files changed

Lines changed: 7 additions & 7 deletions
-91.2 KB
Binary file not shown.
91.4 KB
Binary file not shown.

Blazor.WebForm.Components/Base/ControlComponentBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ private RenderFragment RenderWithCascading<TValue>(TValue control) where TValue
352352
return this.Render(control);
353353
}
354354

355-
protected RenderFragment RenderWithCascading<TValue>(TValue control, RenderFragment childContent, int childLevel = 0) where TValue : Control
355+
protected RenderFragment RenderWithCascading<TValue>(TValue control, RenderFragment childContent = null, int childLevel = 0) where TValue : Control
356356
{
357357
if (!_renderedWithCascading)
358358
{

Blazor.WebForm.Components/Blazor.WebForm.Components.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFramework>net6.0</TargetFramework>
55
<SignAssembly>true</SignAssembly>
66
<AssemblyOriginatorKeyFile>Blazor.WebForm.Components.pfx</AssemblyOriginatorKeyFile>
7-
<Version>2.2.0.1</Version>
7+
<Version>2.2.0.2</Version>
88
<RootNamespace>asp</RootNamespace>
99
<Copyright>Jurio li</Copyright>
1010
<AssemblyName>Blazor.WebForm.Components</AssemblyName>
@@ -17,7 +17,7 @@
1717

1818
<ItemGroup>
1919
<PackageReference Include="Applied" Version="1.2.1.6" />
20-
<PackageReference Include="Blazor.WebForm.UI" Version="2.2.0.1" />
20+
<PackageReference Include="Blazor.WebForm.UI" Version="2.2.0.2" />
2121
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.6" />
2222
</ItemGroup>
2323

Blazor.WebForm.Components/Inner/Base/DataControlField/DataControlFieldPropertyComponent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ protected internal override void SetInnerProperty(IReadOnlyDictionary<string, ob
6060
}
6161
else
6262
{
63-
this.Owner.Add(this.Field);
63+
this.RenderWithCascading(this.Field);
6464
}
6565
}
6666

Blazor.WebForm.Components/Inner/Base/PropertyComponent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ private void RenderWithCascading()
209209
this.OnAfterRenderInternal();
210210
}
211211

212-
protected void RenderWithCascading<TValue>(TValue property, RenderFragment childContent, int childLevel = 0)
212+
protected void RenderWithCascading<TValue>(TValue property, RenderFragment childContent = null, int childLevel = 0)
213213
{
214214
if (_initialized)
215215
{

Blazor.WebForm.Components/Utilities/CascadingChildContent.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using System.Threading.Tasks;
88

99
namespace Blazor.WebForm.UI
10-
1110
{
1211
internal abstract class CascadingChildContentBase
1312
{

Blazor.WebForm.Components/Utilities/ValueChildContentPair.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ internal abstract class ValueChildContentPair
1515

1616
internal class ValueChildContentPair<TValue> : ValueChildContentPair
1717
{
18+
private static readonly RenderFragment EmptyChildContent = builder => { };
1819
public TValue Value { get; }
1920
public RenderFragment ChildContent { get; }
2021
public ValueChildContentPair(TValue value, RenderFragment childContent)
@@ -28,7 +29,7 @@ internal override void AddChildContent(RenderTreeBuilder builder, int sequence)
2829
builder.AddAttribute(sequence + 1, "Value", this.Value);
2930
builder.AddAttribute(sequence + 2, "ChildContent", (RenderFragment)(builder2 =>
3031
{
31-
builder2.AddContent(sequence + 3, this.ChildContent);
32+
builder2.AddContent(sequence + 3, this.ChildContent ?? EmptyChildContent);
3233
}));
3334
builder.CloseComponent();
3435
}

0 commit comments

Comments
 (0)