Skip to content

Commit 1fd4097

Browse files
MudSignaturePad - Sync Value to be empty when the Clear button is fired (#341)
* Sync Value to be empty when the Clear button is fired to prevent discrepency * Fix possible render loop with valuechanged invoke --------- Co-authored-by: Jessica Moolenschot <jessica.moolenschot@nationwide-group.com.au>
1 parent c88d328 commit 1fd4097

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

CodeBeam.MudBlazor.Extensions/Components/SignaturePad/MudSignaturePad.razor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public byte[] Value
7070
[Parameter] public bool ShowLineJoinStyle { get; set; } = true;
7171
[Parameter] public bool ShowLineCapStyle { get; set; } = true;
7272
[Parameter] public bool Dense { get; set; }
73-
[Parameter] public Variant Variant { get; set; }
73+
[Parameter] public Variant Variant { get; set; }
7474
[Parameter] public Color Color { get; set; }
7575
[Parameter] public RenderFragment ToolbarContent { get; set; }
7676

@@ -96,6 +96,7 @@ private async Task IsEditToggled()
9696

9797
async Task ClearPad()
9898
{
99+
await ValueChanged.InvokeAsync(Array.Empty<byte>());
99100
await JsRuntime.InvokeVoidAsync("mudSignaturePad.clearPad", _reference);
100101
}
101102

0 commit comments

Comments
 (0)