vmware-archive/clarity

add reset all filter option in datatable

kitodev opened this issue · 4 comments

Hello,

I did a filter clear that clears the total table filter values:

https://stackblitz.com/edit/clear-allfilter?file=src/app/app.component.ts

I would be wondering how I can do a multiple filter component, by adding an option to delete all filters values on table? - I need both them.

I dont know what is the best way, use checkboxes or select to add multiple select option on datatable column?

I didnt find any example on clarity design system webpage to solve my problem.

Clarity project:
Clarity Angular/UI

Clarity version:
v5.x

Framework:
Angular

Framework version:
Angular 13

Hello there - could you create a repro from one of our starters: https://cds.wtf/

Add more information about what you're trying to do and what you've tried and we can try and help.

Hello there - could you create a repro from one of our starters: https://cds.wtf/

Add more information about what you're trying to do and what you've tried and we can try and help.

@ashleyryan Done

Thanks for the reproduction.
Please use updateFilterValue instead of filterValue. That's what's bound to the clrFilterValue input.
Like this:

clearFilter() {
    this.columns.forEach((column) => (column.updateFilterValue = ''));
}

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.