Skip to content

Commit

Permalink
Datagrid - prevents submitting form on Enter in Filter if SubmitFormO…
Browse files Browse the repository at this point in the history
…nEnter is false. closes #5790
  • Loading branch information
tesar-tech committed Dec 13, 2024
1 parent 5350625 commit 9bc6adb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Extensions/Blazorise.DataGrid/DataGrid.razor
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
}
<Form>

@if ( IsCellEdit && ( CommandColumn is null || !CommandColumn.SaveCommandAllowed ) )
@if ( (IsCellEdit && (CommandColumn is null || !CommandColumn.SaveCommandAllowed))
|| (Filterable && !SubmitFormOnEnter) )
{
//Disable the default form behaviour where pressing enter submits the form and posts the page which is not expected in typical SPA fashion.
<Button Type="ButtonType.Submit" PreventDefaultOnSubmit Disabled Display="Display.None"></Button>
Expand Down

0 comments on commit 9bc6adb

Please sign in to comment.