Hello,
I've encountered the problem as per stated in the title. The problem can be replicated by merging two existing sample code and adding some additional code:
1. Create a DataGrid populated by remote data using sample code from https://blazor.syncfusion.com/documentation/datagrid/data-binding/#binding-with-odata-v4-services.
2. Copy the following sample code from https://blazor.syncfusion.com/documentation/datagrid/editing/#dialog to allow Dialog Adding:
a. `Toolbar="@(new List<string>() { "Add" })"`
b. `<GridEditSettings AllowAdding="true" Mode="EditMode.Dialog"></GridEditSettings>`
3. Modify the default Dialog. For simplicity, I've only added the AutoComplete Field:
<Template>
@{
var order = (context as Order);
}
<div>
<div class="form-row">
<div class="form-group col-md-6">
<SfAutoComplete
ID="@nameof(Order.CustomerID)"
@bind-Value="@(order.CustomerID)"
DataSource="@CustomerIDs">
</SfAutoComplete>
</div
</div>
</div>
</Template>
...
@code{
...
public string[] CustomerIDs = new string[] {"Foo"};
}
4. Perform the following steps:
a. Open DevTools and record Network
b. Click on the DataGrid's "Add" button
c. Type "F" in the AutoComplete Field
d. Press the down button on the keyboard to select "Foo" and press Enter to confirm selection
e. Observe in Network that a HTTP POST request has been sent. This is the same request that would be sent when the "Save" button is clicked.
Expected behavior: HTTP request should not be sent when using keyboard to confirm AutoComplete option.
I've attached an image of the error in the Network tab and the .razor file created from following the above steps.
Seeking your assistance for this issue, thank you!
Attachment:
Foo_7f2b142a.zip