How to add multiple filters(Event Handlers) to the same field?

I have a table of 5 columns and I want to add a search field which will be applicable only on 2 columns. It means I want to search only based on 2 fields out of 5.
To do this, I have added 2 filter option(Event Handlers) to the search field. But its working only on the last added filter option.

Screenshot 2024-02-28 at 11.44.51 AM
Screenshot 2024-02-28 at 11.46.14 AM
Screenshot 2024-02-28 at 11.47.08 AM

Hi @Hitendra_Tajne, welcome to the community!

You can actually do both columns in the same change handler by selecting Set filter stack as the method instead of Set filter. You just need to pass in an array of filters, it could look something like this:

[ 
  { columnId: 'colName',
    operator: 'includes',
    value: '{{self.value}}' 
  },
  { 
    columnId: 'col2Name', 
    operator: 'includes',
    value: '{{self.value}}' 
  } 
]

The documentation with all the options for creating the filter can be found here.

1 Like