Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 6737423

Browse files
committed
Fix filtering
1 parent b10e225 commit 6737423

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/GitHub.UI/Behaviours/AddEmptyItemToList.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@ protected override void OnAttached()
3333
return;
3434
defaultValue = PropertyPathHelper.GetValue(binding.ResolvedSource, binding.ResolvedSourcePropertyName);
3535
}
36-
dynamic items = AssociatedObject.ItemsSource;
37-
var list = items as IList;
36+
var list = AssociatedObject.ItemsSource as IList;
3837
Debug.Assert(list != null, "ItemsSource data source is not an IList, cannot change it.");
3938
if (list == null)
4039
return;
4140
try
4241
{
43-
items.Insert(0, defaultValue);
42+
list.Insert(0, defaultValue);
4443
}
4544
catch (Exception ex)
4645
{
@@ -53,14 +52,13 @@ protected override void OnAttached()
5352
}
5453
else if (AssociatedObject.SelectedIndex == 0)
5554
{
56-
dynamic items = AssociatedObject.ItemsSource;
57-
var list = items as IList;
55+
var list = AssociatedObject.ItemsSource as IList;
5856
Debug.Assert(list != null, "ItemsSource data source is not an IList, cannot change it.");
5957
Debug.Assert(list.Count > 0, "ItemsSource data source is empty, something went wrong.");
6058
if (list == null || list.Count == 0)
6159
return;
62-
if (items[0] == defaultValue)
63-
items.RemoveAt(0);
60+
if (list[0] == defaultValue)
61+
list.RemoveAt(0);
6462
}
6563
}
6664
if (e.RemovedItems.Count > 0)

src/GitHub.VisualStudio/UI/Views/PullRequestListView.xaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,13 @@
156156
Margin="5,0,0,0"
157157
VerticalAlignment="Center"
158158
Content="{Binding SelectedState}"
159-
HasDropDown="True" />
159+
HasDropDown="True">
160+
<i:Interaction.Triggers>
161+
<i:EventTrigger EventName="Click">
162+
<ui:OpenPopupAction TargetName="statePopup" />
163+
</i:EventTrigger>
164+
</i:Interaction.Triggers>
165+
</ui:GitHubActionLink>
160166

161167
<Popup x:Name="statePopup"
162168
AllowsTransparency="True"

0 commit comments

Comments
 (0)