Skip to content

Commit 7bc5225

Browse files
authored
feat(AutoFill): add OnBlurAsync parameter (#4527)
1 parent 44c229c commit 7bc5225

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/UnitTest/Components/AutoFillTest.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,23 @@ public async Task ValidateForm_Ok()
298298
Assert.False(trigger);
299299
}
300300

301+
[Fact]
302+
public async Task OnBlurAsync_Ok()
303+
{
304+
var blur = false;
305+
var cut = Context.RenderComponent<AutoFill<Foo>>(builder =>
306+
{
307+
builder.Add(a => a.OnBlurAsync, v =>
308+
{
309+
blur = true;
310+
return Task.CompletedTask;
311+
});
312+
});
313+
var input = cut.Find("input");
314+
await cut.InvokeAsync(() => { input.Blur(); });
315+
Assert.True(blur);
316+
}
317+
301318
class AutoFillNullStringMock
302319
{
303320
[NotNull]

0 commit comments

Comments
 (0)