komarovalexander / ka-table

Lightweight MIT React Table component with Sorting, Filtering, Grouping, Virtualization, Editing and many more
http://ka-table.com
MIT License
769 stars 56 forks source link

add isFilterActive #425

Open C0casio45 opened 2 months ago

C0casio45 commented 2 months ago

Add in kaPropsUtil or in kaColumnsUtil a function to check if a filter is active

export const isFilterActive = (props: ITableProps) => {
  return props.columns.some((c) => c.headerFilterValues?.length)
}