Skip to content

Commit

Permalink
Removes batchItem from filtered data on Cancel.
Browse files Browse the repository at this point in the history
  • Loading branch information
tesar-tech committed Feb 26, 2025
1 parent 4b74b38 commit 702c9f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/Extensions/Blazorise.DataGrid/DataGrid.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,12 @@ public async Task Cancel()
{
if ( BatchEdit )
{
if ( filteredData is ICollection<TItem> data2 )
{
foreach ( var newItem in batchChanges.Where( x => x.State == DataGridBatchEditItemState.New ) )
data2.Remove( newItem.NewItem );
}

batchChanges?.Clear();
}

Expand Down

0 comments on commit 702c9f8

Please sign in to comment.