Add filterOptions feature with localization support#673
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new filterOptions feature that allows users to filter the dropdown options by their selection status (All, Selected, Unselected), with full localization support across 16 languages. The feature integrates with the existing filter functionality and only works with multiple select (not single select).
Key changes:
- Adds filter option buttons (All/Selected/Unselected) to the dropdown when both
filterandfilterOptionsare enabled - Implements selection-based filtering logic that works in conjunction with text search
- Provides localized strings for all supported languages
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/MultipleSelect.js | Core implementation: adds filterOptions rendering, event handlers, and filtering logic with filterBySelection method |
| src/constants/index.js | Adds filterOptions default setting and format functions for filter option labels |
| src/multiple-select.scss | Base styles for filter options container and buttons with hover/active states |
| src/themes/bootstrap.scss | Bootstrap theme-specific styles using CSS variables |
| src/locale/*.js (16 files) | Adds three localization methods (formatFilterAll, formatFilterSelected, formatFilterUnselected) to all language files |
| site/docs/options.md | Documents the new filterOptions configuration option |
| site/website/static/templates/filter-options.html | Example page demonstrating the filterOptions feature |
| site/website/pages/examples.html | Adds link to the new filter-options example |
| site/website/static/templates/themes.html | Updates themes example to demonstrate filterOptions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8ac9793 to
416ca32
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
416ca32 to
2fd95bc
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2fd95bc to
696b6bb
Compare
No description provided.