vmware-archive / clarity

Clarity is a scalable, accessible, customizable, open source design system built with web components. Works with any JavaScript framework, built for enterprises, and designed to be inclusive.
http://clarity.design
MIT License
6.43k stars 762 forks source link

add reset all filter option in datatable #6684

Closed kitodev closed 2 years ago

kitodev commented 2 years ago

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

ashleyryan commented 2 years ago

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.

kitodev commented 2 years ago

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

Jinnie commented 2 years ago

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 = ''));
}
github-actions[bot] commented 2 years ago

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.