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

Clear all filters button #92

Open
mm-vasyl opened this issue Dec 12, 2023 · 0 comments
Open

Clear all filters button #92

mm-vasyl opened this issue Dec 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@mm-vasyl
Copy link
Collaborator

It would be great to have a single button somewhere around filters to clear all the filters, not 1 by 1 or by editing URL by hands.
Example of code for it:

function handleFiltersClear() {
    let updatedFilters = JSON.parse(JSON.stringify(filters));

    updatedFilters.flat().forEach(filter => {
      filter.selected = false;
    });

    setFilters(updatedFilters);
  }
@mm-vasyl mm-vasyl added the enhancement New feature or request label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant