[results feed] Approvals only apply to tests that are visible and checked

When filters by configuration or test were added, the tests that
were filtered out were still affected when (un)approving tests.

Change-Id: Ia89174f0398ca68d1e7b0ee933b19e0723572af9
Reviewed-on: https://dart-review.googlesource.com/c/dart_ci/+/160323
Reviewed-by: Alexander Thomas <athom@google.com>
diff --git a/results_feed/lib/src/components/results_selector_panel.dart b/results_feed/lib/src/components/results_selector_panel.dart
index dfe0c69..1e5d20f 100644
--- a/results_feed/lib/src/components/results_selector_panel.dart
+++ b/results_feed/lib/src/components/results_selector_panel.dart
@@ -63,6 +63,9 @@
     if (failuresOnly) {
       _changes = Changes(changes.flat.where((change) => change.failed));
     }
+    configurationCheckboxes.clear();
+    resultCheckboxes.clear();
+    checked.clear();
     for (final configurationGroup in changes) {
       configurationCheckboxes[configurationGroup] = FixedMixedCheckbox();
       for (final resultGroup in configurationGroup) {
@@ -140,6 +143,7 @@
 
   void initializeSelected() {
     if (_selected != null && _changes != null) {
+      _selected.clear();
       _selected.addAll(checked.keys);
     }
   }