Skip to content

Commit

Permalink
refactor: 修复超长文本内容溢出时 tooltip 不居中问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ArgoZhang committed Nov 1, 2023
1 parent b3da32d commit 6412ac8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/BootstrapBlazor/Extensions/ITableColumnExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,12 @@ public static List<IFilterAction> ToSearches(this IEnumerable<ITableColumn> colu
{
pb.OpenComponent<Tooltip>(0);
pb.AddAttribute(1, nameof(Tooltip.Title), text);
pb.AddAttribute(2, nameof(Tooltip.ChildContent), new RenderFragment(builder => builder.AddContent(0, text)));
pb.AddAttribute(2, nameof(Tooltip.ChildContent), new RenderFragment(builder =>
{
builder.OpenElement(0, "span");
builder.AddContent(10, text);
builder.CloseElement();
}));
pb.CloseComponent();
}
else if (col.IsMarkupString)
Expand Down

0 comments on commit 6412ac8

Please sign in to comment.