Check if table filter is Active/On and Apply CSS

  • 1
  • Question
  • Updated 5 years ago
Archived and Closed

This conversation is no longer open for comments or replies and is no longer visible to community members. The community moderator provided the following reason for archiving: Fixed bugs and duplicate tickets

Hi Team,

Is there  a way to check if table filter is Active/On and apply CSS to Active filters  to make them stand out from rest of the filters? I want to change background color of Active Filters on the table. Any help would be much appreciated.

Cheers!
Photo of Gyan

Gyan

  • 1,422 Points 1k badge 2x thumb

Posted 5 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,988 Points 20k badge 2x thumb
Janendra,  you can certainly inspect the "Active" state of our toggle filters and add custom CSS attributes to that class.  However, we do not have different classes applied to the filter control of a Select filter when it is in the default "all values" state or a specific state.   Sorry. 

I get what you are after.  I'm forever being frustrated at not finding some data I think should be in my table, and then belatedly realizing that I have some filter set.  More effective highlighting of active filters would be helpful.  We'll take it away as an improvement suggestion. 
Photo of Gyan

Gyan

  • 1,422 Points 1k badge 2x thumb
Hi Rob,
Thanks for your reply and I am glad that we can inspect "Active" state of toggle filters. It would be great if you could provide a sample code to check this "Active" state. Something like:

if (a filter is active) {
      make background color red for that filter;
}

This conversation is no longer open for comments or replies.