Skip to content

Commit

Permalink
fixes #56899 InputGroups - nerenderují se dobře
Browse files Browse the repository at this point in the history
  • Loading branch information
hakenr committed Aug 19, 2021
1 parent 80d26a2 commit 9b376ab
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,16 @@ protected virtual void BuildRenderInputGroups(RenderTreeBuilder builder, RenderF
builder.OpenElement(100, "span");
builder.AddAttribute(101, "class", CssClassHelper.Combine("input-group", formValueComponentWithInputGroups.InputGroupCssClass, GetInputGroupSizeCssClass(formValueComponentWithInputGroups.InputGroupSize)));

if (!String.IsNullOrEmpty(formValueComponentWithInputGroups.InputGroupStart))
if (!String.IsNullOrEmpty(formValueComponentWithInputGroups.InputGroupStart)
|| (formValueComponentWithInputGroups.InputGroupStartTemplate is not null))
{
builder.OpenElement(200, "span");
builder.AddAttribute(201, "class", "input-group-text");
builder.AddContent(202, formValueComponentWithInputGroups.InputGroupStart);
builder.AddContent(300, formValueComponentWithInputGroups.InputGroupStartTemplate);
builder.CloseElement(); // span.input-group-text
}

builder.AddContent(300, formValueComponentWithInputGroups.InputGroupStartTemplate);
}

builder.OpenRegion(400);
Expand All @@ -141,16 +142,16 @@ protected virtual void BuildRenderInputGroups(RenderTreeBuilder builder, RenderF

if (shouldRenderInputGroups)
{
if (!String.IsNullOrEmpty(formValueComponentWithInputGroups.InputGroupEnd))
if (!String.IsNullOrEmpty(formValueComponentWithInputGroups.InputGroupEnd)
|| (formValueComponentWithInputGroups.InputGroupEndTemplate is not null))
{
builder.OpenElement(500, "span");
builder.AddAttribute(501, "class", "input-group-text");
builder.AddContent(600, formValueComponentWithInputGroups.InputGroupEnd);
builder.AddContent(601, formValueComponentWithInputGroups.InputGroupEndTemplate);
builder.CloseElement(); // span.input-group-text
}

builder.AddContent(600, formValueComponentWithInputGroups.InputGroupEndTemplate);

builder.CloseElement(); // span.input-group
}
}
Expand Down

0 comments on commit 9b376ab

Please sign in to comment.