vikramlearning / blazorbootstrap

An Enterprise-class Blazor Bootstrap Component library built on the Blazor and Bootstrap CSS frameworks.
https://docs.blazorbootstrap.com/
Apache License 2.0
670 stars 32 forks source link

Tooltip on a button problem #226

Closed LucaCris closed 1 year ago

LucaCris commented 1 year ago

Surround a button with a tooltip:

<ToolTip Title=...>
            <Button Color="ButtonColor.Primary" @onclick="OnRefresh"><Icon Name="IconName.ArrowClockwise" /></Button>
</ToolTip>

The tooltip appears, but if the button action fire up a content redraw, the tooltip remain stucked on page (until click somewhere else).

Severity: can't use tooltip in such buttons.

gvreddy04 commented 1 year ago

@LucaCris Button itself supports tooltip. You no need to wrap Button inside the Tooltip.

<Button Color="ButtonColor.Primary" TooltipTitle="Tooltip text" TooltipPlacement="TooltipPlacement.Top"> Tooltip Top </Button>

<Button Color="ButtonColor.Primary" TooltipTitle="Tooltip text" TooltipPlacement="TooltipPlacement.Right"> Tooltip Right </Button>

<Button Color="ButtonColor.Primary" TooltipTitle="Tooltip text" TooltipPlacement="TooltipPlacement.Bottom"> Tooltip Bottom </Button>

<Button Color="ButtonColor.Primary" TooltipTitle="Tooltip text" TooltipPlacement="TooltipPlacement.Left"> Tooltip Left </Button>`

Link: https://demos.blazorbootstrap.com/buttons#show-tooltip

LucaCris commented 1 year ago

Screenshot 2023-06-08 112652

I confirm it doesn't work either...

<Button Color="ButtonColor.Primary" @onclick="OnRefresh" TooltipTitle="Tooltip text" TooltipPlacement="TooltipPlacement.Top"><Icon Name="IconName.ArrowClockwise" /></Button>

gvreddy04 commented 1 year ago

@LucaCris This is fixed part of Button TooltipTitle does not disappear when clicked #222. Will be released with v1.8.2.

gvreddy04 commented 1 year ago

This is fixed part of #222.