Skip to content

feat(typeahead): add support for custom filter function #6748

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

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

valorkin
Copy link
Member

Summary

  • Add support for custom filter functions in typeahead directive
  • Developers can now provide custom filtering logic via typeaheadFilterFunction input
  • Function signature: (option: any, query: string) => boolean
  • Maintains full backward compatibility with existing default filtering

Test plan

  • Custom filter function works with complex filtering logic
  • Default filtering still works when no custom filter provided
  • Unit tests cover custom filter functionality and edge cases
  • E2E tests verify behavior in real browser environment
  • No regressions in existing typeahead functionality

🤖 Generated with Claude Code

- Add typeaheadFilterFunction input property to TypeaheadDirective
- Allow users to provide custom filter logic via (option: any, query: string) => boolean function
- When custom filter is provided, use it instead of default testMatch logic
- Maintain backward compatibility - falls back to default filtering when no custom filter provided
- Add comprehensive unit tests for custom filter functionality
- Add E2E tests to verify custom filter behavior

Fixes #479

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant