[Question] Is it possible to use different filteringModes on different columns?
Closed this issue · 3 comments
Hi,
I would like to have a table whereby some columns use the filteringMode of FilteringMode.FilterRow and some columns using FilteringMode.HeaderFilter. Here is what I have at the moment, I only have FilterRow at the moment but I would like Email, Role and Team to have the FilterRow, but Repo1, Repo2 and Repo3 to have FilterHeader. Is there anyway I could achieve that?
<Table
columns={[
{ key: 'Email', title: 'Email', dataType: DataType.String },
{ key: 'Role', title: 'Role', dataType: DataType.String },
{ key: 'Team', title: 'Team', dataType: DataType.String },
{ key: 'Repo1', title: 'Repo 1', dataType: DataType.String },
{ key: 'Repo2', title: 'Repo 2', dataType: DataType.String },
{ key: 'Repo3', title: 'Repo 3', dataType: DataType.String },
]}
data={data}
paging={{
enabled: true,
pageSize: 8,
position: PagingPosition.Bottom
}}
filteringMode={FilteringMode.FilterRow}
rowKeyField={'id'}
sortingMode={SortingMode.Single}
/>
Thanks for your help in advanced!
Hi @lamalvin21 I've just added this ability to the ka-table
, use FilteringMode.FilterRowAndHeaderFilter
in v8.5.0
demo: https://stackblitz.com/edit/table-filter-row-ts-tyxaaf?file=Demo.tsx
to hide filterRow and headerFilter for particular column customize headFilterButton
and filterRowCell
of childComponents
https://komarovalexander.github.io/ka-table/#/filter-row-custom-editor
Thank you!