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

feat(list): add filterPredicate property to handle custom filtering #11044

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

driskull
Copy link
Member

@driskull driskull commented Dec 13, 2024

Related Issue: #6544

Summary

  • add filterPredicate property.
    • filterPredicate: (item: ListItem["el"]) => boolean;
  • add e2e test
  • cleanup

Example

list.filterPredicate = (item) => {
  if (list.filterText === "all") {
    return true;
  }

  return item.value === "item2";
};

@github-actions github-actions bot added the enhancement Issues tied to a new feature or request. label Dec 13, 2024
@driskull driskull changed the title feat(list): add customFilter property to support custom filtering logic feat(list): add filterItems property to support custom filtering Dec 13, 2024
@driskull driskull changed the title feat(list): add filterItems property to support custom filtering feat(list): add filterItems property to handle custom filtering Dec 13, 2024
@driskull driskull changed the title feat(list): add filterItems property to handle custom filtering feat(list): add filterPredicate property to handle custom filtering Dec 14, 2024
…-design-system into dris0000/list-custom-filter
@driskull driskull marked this pull request as ready for review December 14, 2024 06:41
@driskull driskull requested a review from jcfranco December 14, 2024 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues tied to a new feature or request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant