Hi we have been trying to utilise the TelerikTooltip dynamically for a number of different reasons across various controls and buttons. We notice part of the tooltip icon will still display if the controls tooltip property is either null or empty (see the code snippit from the REPL below.
Is there an existing way with the TelerikTooltip (without too much hacking) that it will NOT show the tooltip if the target title is null or empty or whitespace?
With this snippit you may also notice an issue with trying to use dynamic tooltips in that the tooltip on the button does not update when pressed. Similar to the question found here: https://feedback.telerik.com/blazor/1460642-the-tooltip-should-be-able-to-re-evaluate-targets-tooltip-not-working-for-elements-not-present-at-first-rendering
@if (RepaintTooltipFlag)
{
<TelerikTooltip TargetSelector=".tooltip-target">
</TelerikTooltip>
}
<TelerikButton class="tooltip-target" title="@buttonTooltip" OnClick="@AddMoreContent">show more content</TelerikButton>
@code{
string buttonTooltip {get;set;} = "";
bool AllContentVisible { get; set; }
//part of workaround
bool RepaintTooltipFlag { get; set; } = true;
async Task AddMoreContent()
{
AllContentVisible = true;
buttonTooltip = "More Content Tip";
//workaround
RepaintTooltipFlag = false;
await Task.Delay(30);
RepaintTooltipFlag = true;
}
}