havit / Havit.Blazor

Free Bootstrap 5 components for ASP.NET Blazor + optional enterprise-level stack for Blazor development (gRPC code-first, layered architecture, localization, auth, ...)
https://havit.blazor.eu
MIT License
475 stars 66 forks source link

HxButtonGroup does not work when containing HxButtons using tooltip #738

Closed oscar230 closed 7 months ago

oscar230 commented 7 months ago

Bug

When using tooltips on buttons inside of a HxButtonGroup the buttons with tooltips are rendered as ungrouped, I've encountered this bug several times.

Image of a broken HxButtonGroup

image

Image of the broken HxButtonGroup with the HxButtons tooltip showing.

image

Code

<div class="col-12">
    <HxButtonGroup>
        <HxButton Color="ThemeColor.Secondary" Size="ButtonSize.Small" Icon="BootstrapIcon.CheckAll" Text="@buttonSelectAllText" Tooltip="@buttonSelectAllTooltipText" OnClick="SelectAll" />
        <HxButton Color="ThemeColor.Secondary" Size="ButtonSize.Small" Icon="BootstrapIcon.CheckAll" Text="@buttonSelectImportantText" Tooltip="@buttonSelectImportantTooltipText" OnClick="SelectImportant" />
    </HxButtonGroup>
</div>

Version

Expected behavior

image

hakenr commented 7 months ago

This behavior is intentional and documented here: https://havit.blazor.eu/components/HxButtonGroup#buttons-with-tooltips

If you need to use tooltips for buttons within button groups, consider using attribute splatting to apply raw Bootstrap tooltip attributes to the buttons.

oscar230 commented 7 months ago

Alright, thanks @hakenr I didn't know that :)