dotnet/aspnetcore

EditForm: Add method to submit form async

Open

#10,953 建立於 2019年6月6日

在 GitHub 查看
 (12 留言) (11 反應) (0 負責人)C# (10,653 fork)batch import
Pillar: Complete Blazor Webaffected-fewarea-blazorenhancementfeature-blazor-builtin-componentshelp wantedseverity-minor

倉庫指標

Star
 (37,933 star)
PR 合併指標
 (平均合併 16天 9小時) (30 天內合併 258 個 PR)

描述

Right now you can only submit the EditForm by adding a button[type=submit] and clicking it. I'd like to have a way to manually invoke the form submit with a method. Something like

<EditForm Model=@model ref="myForm"> <button on click="@(() => myForm.Submit())">Click me</button> </EditForm>

貢獻者指南