2 Replies Latest reply on Feb 25, 2019 12:31 PM by Keshia Rose

    How to determine that the (All) filter was selected with the javascript api?

    Chris Weber

      With the javascript api, we can detecte changes to the filters via addEventListener with FILTER_CHANGE.


      This works fine.


      The issue is that there doesn't seem to be a way to determine that the (All) filter has been selected vs multiple selections (where allowed).


      We can use the filter event (filterEvent.getFilterAsync()) to get the filter, in this case a CategoricalFilter so we can use getAppliedValues() to get a list of all applied values.


      However, without then comparing that list to EVERY available filter, how would we know that the special  (All) filter has been selected?


      As an example, use this sample:
      Respond to Events - Tableau




      How could you detect that the the (All) filter was selected?