harleyjj commented on a change in pull request #4131: [TE] frontend - 
harleyjj/anomalies - make anomalies filterable by sub…
URL: https://github.com/apache/incubator-pinot/pull/4131#discussion_r276402915
 
 

 ##########
 File path: thirdeye/thirdeye-frontend/app/pods/anomalies/controller.js
 ##########
 @@ -167,15 +173,13 @@ export default Controller.extend({
         // no filter applied, just return all
         return anomalyIds;
       }
-      let selectedAnomalies = [];
+      let selectedAnomalies = anomalyIds;
       filterMaps.forEach(map => {
-        if (anomalyFilters[map]) {
+        const selectedFilters = anomalyFilters[map];
+        // When a filter gets deleted, it leaves an empty array behind.  We 
need to treat null and empty array the same here
+        if (selectedFilters && Array.isArray(selectedFilters) && 
selectedFilters.length > 0) {
 
 Review comment:
   Thank you -very useful!  I will push that change now.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to