'How to databind in radzen radzen tooltip
I have button which opens Html tooltip like this:
@inject TooltipService _tooltipService
<RadzenButton @ref=_deleteButton Click="OpenTooltip" />
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = null!;
private RadzenButton _deleteButton = null!;
private void OpenTooltip()
{
_tooltipService.Open(_deleteButton.Element, _ => ChildContent, new TooltipOptions { Duration = null });
}
}
When button is clicked, it correctly renders content, however if ChildContent contains databindings, they are not bound. For instance:
<ButtonWithPopup>
Value is @_val.ToString()
<RadzenButton Text="ClickME" Click="Callback"/>
</ButtonWithPopup>
Value outside is @_val.ToString()
@code
{
private bool _val;
private async Task Callback()
{
_val = true;
}
}
This will print Value is false, Value outside is true.
How can I force tooltip to be rerendered when its content changes?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
