score:1

Accepted answer

to achieve that, you can use onfilterchange callback, like this :

const options = {
...

    onfilterchange: (column, filterlist, type) => {
            const selectedfilters = this.extractfilters(filterlist);
            console.log(selectedfilters);
          }
}

this function will be called everytime filter list changes.

then, you declare function extractfilters which will extract all selected filters from passed filterlist and it will return array object containting all selected filters :

 extractfilters = (filterlist) => {
        let selectedfilters = [];
        filterlist.foreach((filter) => {
          if (filter.length > 0) {
            selectedfilters.push(...filter);
          }
        });
        return selectedfilters;
      };

you can store this array in state.

here is working example.


Related Query

More Query from same tag