Telerik UI for Blazor 15.2.0 introduces a few problems with the Signature Value:
A workaround for the first issue is to recreate the component:
<TelerikButton OnClick="@ClearSignature" Visible="@(!string.IsNullOrEmpty(SignatureValue))">Clear</TelerikButton>
<TelerikSignature @bind-Value="@SignatureValue"
Width="600px"
Height="200px" />
Workaround:
@if (ShouldRenderSignature)
{
<TelerikSignature @bind-Value="@SignatureValue"
Width="600px"
Height="200px" />
}
@code {
private string? SignatureValue { get; set; }
private bool ShouldRenderSignature { get; set; } = true;
private async Task ClearSignature()
{
SignatureValue = null;
ShouldRenderSignature = false;
await Task.Delay(1);
ShouldRenderSignature = true;
}
}