-
Couldn't load subscription status.
- Fork 2.8k
Picker data source: Add support for pickable filters #20491
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
Picker data source: Add support for pickable filters #20491
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for pickable filters in picker data sources, allowing developers to disable specific tree items, collection items, or search result items based on custom logic. This provides more granular control over what can be selected in picker interfaces.
Key changes:
- Added pickable filter properties to data source interfaces for tree, collection, and search scenarios
- Updated picker modal elements to use the appropriate pickable filters for search functionality
- Enhanced type safety by adding generic type parameters to data source interfaces
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| input-entity-data.context.ts | Passes pickable filters from data sources to modal configurations |
| tree-picker-modal.element.ts | Uses search-specific pickable filter with fallback logic |
| picker-search-result.element.ts | Updates type constraint for pickable filter to use search result items |
| tree-data-source/types.ts | Adds generic typing and treePickableFilter property |
| searchable-data-source/types.ts | Adds generic typing and searchPickableFilter property |
| data-source/types.ts | Adds generic typing for picked item types |
| collection-data-source/types.ts | Adds generic typing and collectionPickableFilter property |
| modal/types.ts | Adds pickable filter support to search configuration |
| collection-item-picker-modal.element.ts | Uses search-specific pickable filter with fallback logic |
| example-document-picker-data-source.ts | Implements pickable filter based on document types configuration |
| example-custom-picker-tree-data-source.ts | Implements pickable filters for custom tree and search scenarios |
| .vscode/settings.json | Adds spelling dictionary entries for "pickable" terms |
This PR adds support for a pickable filter in a picker data source. This means that it is possible to disable specific tree items, collection items, or search result items based on custom logic.
How to test
There are currently two easy ways to test using the example:
pickableFilterto prevent the selection of folders