Skip to content

Commit

Permalink
2.2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Jurioli committed Jun 25, 2022
1 parent 8e14978 commit 0bf5632
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 7 deletions.
Binary file removed Blazor.WebForm.Components.2.2.0.1.nupkg
Binary file not shown.
Binary file added Blazor.WebForm.Components.2.2.0.2.nupkg
Binary file not shown.
2 changes: 1 addition & 1 deletion Blazor.WebForm.Components/Base/ControlComponentBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ private RenderFragment RenderWithCascading<TValue>(TValue control) where TValue
return this.Render(control);
}

protected RenderFragment RenderWithCascading<TValue>(TValue control, RenderFragment childContent, int childLevel = 0) where TValue : Control
protected RenderFragment RenderWithCascading<TValue>(TValue control, RenderFragment childContent = null, int childLevel = 0) where TValue : Control
{
if (!_renderedWithCascading)
{
Expand Down
4 changes: 2 additions & 2 deletions Blazor.WebForm.Components/Blazor.WebForm.Components.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Blazor.WebForm.Components.pfx</AssemblyOriginatorKeyFile>
<Version>2.2.0.1</Version>
<Version>2.2.0.2</Version>
<RootNamespace>asp</RootNamespace>
<Copyright>Jurio li</Copyright>
<AssemblyName>Blazor.WebForm.Components</AssemblyName>
Expand All @@ -17,7 +17,7 @@

<ItemGroup>
<PackageReference Include="Applied" Version="1.2.1.6" />
<PackageReference Include="Blazor.WebForm.UI" Version="2.2.0.1" />
<PackageReference Include="Blazor.WebForm.UI" Version="2.2.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.6" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected internal override void SetInnerProperty(IReadOnlyDictionary<string, ob
}
else
{
this.Owner.Add(this.Field);
this.RenderWithCascading(this.Field);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Blazor.WebForm.Components/Inner/Base/PropertyComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ private void RenderWithCascading()
this.OnAfterRenderInternal();
}

protected void RenderWithCascading<TValue>(TValue property, RenderFragment childContent, int childLevel = 0)
protected void RenderWithCascading<TValue>(TValue property, RenderFragment childContent = null, int childLevel = 0)
{
if (_initialized)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.Threading.Tasks;

namespace Blazor.WebForm.UI

{
internal abstract class CascadingChildContentBase
{
Expand Down
3 changes: 2 additions & 1 deletion Blazor.WebForm.Components/Utilities/ValueChildContentPair.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ internal abstract class ValueChildContentPair

internal class ValueChildContentPair<TValue> : ValueChildContentPair
{
private static readonly RenderFragment EmptyChildContent = builder => { };
public TValue Value { get; }
public RenderFragment ChildContent { get; }
public ValueChildContentPair(TValue value, RenderFragment childContent)
Expand All @@ -28,7 +29,7 @@ internal override void AddChildContent(RenderTreeBuilder builder, int sequence)
builder.AddAttribute(sequence + 1, "Value", this.Value);
builder.AddAttribute(sequence + 2, "ChildContent", (RenderFragment)(builder2 =>
{
builder2.AddContent(sequence + 3, this.ChildContent);
builder2.AddContent(sequence + 3, this.ChildContent ?? EmptyChildContent);
}));
builder.CloseComponent();
}
Expand Down

0 comments on commit 0bf5632

Please sign in to comment.