Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reset method to DataTable #1088

Closed
nsksaisaravana opened this issue Nov 21, 2019 · 6 comments
Closed

Add reset method to DataTable #1088

nsksaisaravana opened this issue Nov 21, 2019 · 6 comments
Assignees
Labels
Type: New Feature Issue contains a new feature or new component request
Milestone

Comments

@nsksaisaravana
Copy link

Would be good to be able to clear all filters with a single button click. This includes all column filters and the global filter.

[ ] bug report
[* ] feature request
[ ] support request => Please do not submit support request here, instead see

The same is available in the PrimeNg, please check the below url
primefaces/primeng#232

@nsksaisaravana
Copy link
Author

better provide an API to reset the data table and really helps a lot to set the DataTable to original state during clear or reload data etc.

@sonicwong
Copy link

I suggest to have a function to enable/disable filter temporarily too.

@mertsincan mertsincan changed the title [New Feature] DataTable clear filters support Add reset method to DataTable Nov 27, 2019
@mertsincan mertsincan self-assigned this Nov 27, 2019
@mertsincan mertsincan added the Type: New Feature Issue contains a new feature or new component request label Nov 27, 2019
@mertsincan mertsincan added this to the 3.3.3 milestone Nov 27, 2019
@mertsincan
Copy link
Member

Hi @sonicwong,

Could you please give me more details?

@sonicwong
Copy link

@mertsincan
my idea like this image:
https://imgur.com/a/2DXyF9B

But I found it is not easy to do, I have to:

  1. store value of filter to other variable
  2. clear each filter value
  3. hide filter row ui

@MarioKrstevski
Copy link

@mertsincan Can you please help me on how to use the new reset() method. Do I call it from the table ref?

Do you have an idea, of when will the milestone 3.3.3 be released?

@nsksaisaravana
Copy link
Author

@MarioKrstevski Yes, you should call from the table reference like below. Hope this helps.

private dt:any

<DataTable ref={(el) => this.dt = el}

this.dt.reset();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

No branches or pull requests

4 participants