Skip to content

fix:FluentTextArea enter key valid EditForm #1085

Open
@be-swarm

Description

@be-swarm

🐛 Bug Report

When FluentTextArea is used in EditForm when enter key is pressed EditForm is submitted

💻 Code Sample

<EditForm Model="@_current" OnValidSubmit="@ActionNewMailTemplate">
    <BeSwarm.Validator.BlazorValidator ValidateContext="_validatorContext" />
    <FluentTextField Label="Code" @bind-Value=_current.TemplateName></FluentTextField>
    <ValidationMessage For="@(() => _current.TemplateName)" />
    <FluentSwitch @bind-Value=_current.IsBodyHtml>Html</FluentSwitch>
    <FluentTextField Label="Sujet" @bind-Value=_current.Subject></FluentTextField>
    <ValidationMessage For="@(() => _current.Subject)" />
    <FluentTextArea @bind-Value=_current.Body Placeholder="message ..."></FluentTextArea>
    <ValidationMessage For="@(() => _current.Body)" />
    <div>
        <FluentButton Type="ButtonType.Submit" Appearance="Appearance.Accent "> Ajouter</FluentButton>
    </div>
</EditForm>
@code
{
   private async Task ActionNewMailTemplate()
   {
      ....
   }
}

ActionNewMailTemplate is called when enter key is pressed in FluentTextField

Is it possible to prevent this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:fastA FAST-specific issuebugA bugstatus:blockedAny issue blocked by another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions