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 a "Clear all filters" button #8017

Merged
merged 10 commits into from
Aug 3, 2022
Merged

Add a "Clear all filters" button #8017

merged 10 commits into from
Aug 3, 2022

Conversation

antoinefricker
Copy link
Contributor

@antoinefricker antoinefricker commented Jul 27, 2022

Fix #7831

  • Add a "Clear all filters" button in FilterButton component
  • Add a storybook scenario
  • Write unit tests
    • Display if a filter is set
    • Don't display if no filter is set
    • Clears all filters when clicked
Enregistrement.de.l.ecran.2022-07-27.a.14.46.18.mov

@fzaninotto
Copy link
Member

In the storybook, the "add filter" button appears at the wrong place.

image

Besides, when I add a filter, the list briefly blinks before disappearing

Enregistrement.de.l.ecran.2022-07-29.a.15.43.03.mov

@antoinefricker
Copy link
Contributor Author

In the storybook, the "add filter" button appears at the wrong place.

Wrapped it in a <TopToolbar>

Besides, when I add a filter, the list briefly blinks before disappearing

There were no title such as "Hello world!" hence the blink.

Copy link
Member

@fzaninotto fzaninotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! But as it's technically a new feature, we have to release it in a minor version instead of a bugfix. Could you rebase against the next branch?

antoinefricker added a commit that referenced this pull request Aug 3, 2022
antoinefricker added a commit that referenced this pull request Aug 3, 2022
antoinefricker added a commit that referenced this pull request Aug 3, 2022
@antoinefricker antoinefricker changed the base branch from master to next August 3, 2022 14:54
antoinefricker added a commit that referenced this pull request Aug 3, 2022
antoinefricker added a commit that referenced this pull request Aug 3, 2022
antoinefricker added a commit that referenced this pull request Aug 3, 2022
See at "ra-ui-material > list > List > li > filters"
@djhi djhi added this to the 4.3 milestone Aug 3, 2022
@djhi djhi merged commit 61fe351 into next Aug 3, 2022
@djhi djhi deleted the 7831-clear-all-filters branch August 3, 2022 17:01
@djhi
Copy link
Contributor

djhi commented Aug 3, 2022

Great!

Seojun-Park pushed a commit to Seojun-Park/react-admin that referenced this pull request Oct 25, 2022
Seojun-Park pushed a commit to Seojun-Park/react-admin that referenced this pull request Oct 25, 2022
Seojun-Park pushed a commit to Seojun-Park/react-admin that referenced this pull request Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clear (reset) filter action
3 participants