Skip to content

Conversation

@madsrasmussen
Copy link
Contributor

@madsrasmussen madsrasmussen commented Oct 13, 2025

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:

  1. The custom tree data source example implements a pickableFilter to prevent the selection of folders
Screenshot 2025-10-13 at 22 12 42
  1. The Documetn data source example implements a config on the Data Type where you can specific which Document Types to pick from:
Screenshot 2025-10-13 at 22 13 19

@madsrasmussen madsrasmussen changed the title Picker data source pickable filter Picker data source: Add support for pickable filters Oct 13, 2025
@madsrasmussen madsrasmussen marked this pull request as ready for review October 13, 2025 20:23
Copilot AI review requested due to automatic review settings October 13, 2025 20:23
Copy link
Contributor

Copilot AI left a 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

@leekelleher leekelleher self-requested a review October 14, 2025 15:52
@leekelleher leekelleher merged commit 12297ea into release/17.0 Oct 14, 2025
23 checks passed
@leekelleher leekelleher deleted the v17/hotfix/picker-data-source-pickable-filter branch October 14, 2025 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants