Skip to content

Commit ec49f14

Browse files
committed
Fix #40: When relaxing filter criteria, the selected item should stay in view
1 parent 4feadfe commit ec49f14

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

DataGridExtensions/DataGridFilterHost.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,12 @@ private void EvaluateFilter()
281281
{
282282
control?.ValuesUpdated();
283283
}
284+
285+
var selectedItem = DataGrid.SelectedItem;
286+
if (selectedItem != null)
287+
{
288+
DataGrid.ScrollIntoView(selectedItem);
289+
}
284290
}
285291
catch (InvalidOperationException)
286292
{

0 commit comments

Comments
 (0)