Skip to content

Commit 4c98383

Browse files
committed
Fix broken data flow in MultipleChoiceFilter
1 parent 599a6d8 commit 4c98383

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/DataGridExtensions/ListBoxSelectAllBehavior.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ private void ListBox_CollectionChanged()
9090

9191
if (AreAllFilesSelected.GetValueOrDefault())
9292
{
93-
listBox?.SelectAll();
93+
if (listBox?.IsLoaded == true)
94+
{
95+
listBox.SelectAll();
96+
}
9497
}
9598
}
9699

src/DataGridExtensions/MultipleChoiceFilter.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,12 @@ private void Filter_Changed()
245245

246246
Text = filter?.Text;
247247

248-
if (filter?.Items == null && listBox.IsLoaded)
248+
if (filter?.Items == null)
249249
{
250-
listBox.SelectAll();
250+
if (listBox.IsLoaded)
251+
{
252+
listBox.SelectAll();
253+
}
251254
return;
252255
}
253256

0 commit comments

Comments
 (0)