Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataGrid: prevent submitting form on Enter #5897

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))
stsrki marked this conversation as resolved.
Show resolved Hide resolved
|| (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
Loading