MudBlazor/MudBlazor

Add support for submitting MudForm on Enter key press

开放

#9,555 创建于 2024年8月2日

 (2 条评论) (0 个反应) (0 位负责人)C# (1,631 个派生)batch import
enhancementhelp wanted

仓库指标

星标
 (10,394 个星标)
PR 合并指标
 (平均合并 6天 6小时) (30 天内合并 108 个 PR)

描述

Feature request type

Enhance component

Component name

MudForm

Is your feature request related to a problem?

MudForm (and MudDialog) is missing the option to submit the form while pressing Enter (or another) key while focus is anywhere inside the form.

Describe the solution you'd like

Same solution as with classic forms or Blazors EditForm - either pair the submit method with button with: ButtonType="ButtonType.Submit" button.

Or provide some MudForm API (method or property) to handle Enter/submit key press.

Have you seen this feature anywhere else?

EditForm or any classic form element implementation.

Describe alternatives you've considered

Considered workarounds mentioned here: https://github.com/MudBlazor/MudBlazor/issues/4715 https://github.com/MudBlazor/MudBlazor/pull/4478 but they are not good enough and do not provide same functionality.

Pull Request

  • I would like to do a Pull Request

Code of Conduct

  • I agree to follow this project's Code of Conduct

贡献者指南