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

Allow to customize how <FilterListItem> applies filters #8676

Merged
merged 7 commits into from
Feb 24, 2023

Conversation

djhi
Copy link
Collaborator

@djhi djhi commented Feb 22, 2023

Problem

There is now easy way to implement cumulative filters (filtering by multiple tags for instance) without reimplementing <FilterListItem>.

Solution

Introduce two new props:

  • isSelected: accept the item value and the current filters and return a boolean
  • toggleFilter: accept the item value and the current filters and return new filters

TODO

  • Implementation
  • Storybook
  • Tests
  • Documentation

## Problem
There is now easy way to implement cumulative filters (filtering by multiple tags for instance) without reimplementing  `<FilterListItem>`.

### Solution
Introduce two new props:
- isSelected: accept the item value and the current filters and return a boolean
- toggleFilter: accept the item value and the current filters and return new filters
docs/FilterList.md Show resolved Hide resolved
docs/FilterList.md Show resolved Hide resolved
docs/FilterList.md Outdated Show resolved Hide resolved
docs/FilterList.md Outdated Show resolved Hide resolved
Co-authored-by: Jean-Baptiste Kaiser <jb@marmelab.com>
@slax57 slax57 added this to the 4.9.0 milestone Feb 24, 2023
@slax57 slax57 merged commit 78a3567 into next Feb 24, 2023
@slax57 slax57 deleted the allow-filter-list-item-customization branch February 24, 2023 14:00
@davidhenley
Copy link
Contributor

Thank you so much Gildas! This will help a ton.

@davidhenley
Copy link
Contributor

Hey @djhi is there a reason that this is in the 4.9 milestone and not being merged into one of the more recent releases?

@fzaninotto
Copy link
Member

Yes: we follow semver.

  • bug fix every week (bugfix or x.x.X)
  • new backward compatible features every month (minor or x.X.x)
  • breaking changes very seldom (major or X.x.x)

This change was merged after the latest minor (4.8.0), so it's scheduled for the next minor (4.9.0).

@davidhenley
Copy link
Contributor

Thanks @fzaninotto!

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.

4 participants