feat(cdk-experimental/ui-patterns): create List behavior#31601
Merged
wagnermaciel merged 5 commits intoangular:mainfrom Jul 31, 2025
Merged
feat(cdk-experimental/ui-patterns): create List behavior#31601wagnermaciel merged 5 commits intoangular:mainfrom
wagnermaciel merged 5 commits intoangular:mainfrom
Conversation
ea85bf3 to
23f0334
Compare
ok7sai
approved these changes
Jul 29, 2025
| .on('Home', () => this.first()) | ||
| .on('End', () => this.last()) | ||
| .on(this.typeaheadRegexp, e => this.search(e.key)); | ||
| .on(this.prevKey, () => this.listBehavior.prev()) |
Member
There was a problem hiding this comment.
I with the List behavior can also provide basic event manager since the arrow keys and home/end behaviors are the same across UI patterns.
Contributor
Author
There was a problem hiding this comment.
We could but I think decentralizing event handlers will make tracking event handler logic harder in the future
23f0334 to
5543fb0
Compare
andrewseguin
approved these changes
Jul 30, 2025
- Adds a new `List` behavior class to `@angular/cdk-experimental/ui-patterns/behaviors`. - This new behavior composes the existing `ListFocus`, `ListNavigation`, `ListSelection`, and `ListTypeahead` behaviors into a single, cohesive class for managing the state and interactions of a list-based component. - This behavior is intended to be unify the copy/pasted logic in `ListboxPattern`, `TreePattern`, `RadioGroupPattern`, and any other patterns where it makes sense. The `List` behavior provides a simplified, high-level API for common list operations, including: - Navigation (`next`, `prev`, `first`, `last`) - Selection (single, multi, range) - Typeahead search - Focus management (`roving` and `activedescendant`)
5543fb0 to
cfc9521
Compare
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Listbehavior class to@angular/cdk-experimental/ui-patterns/behaviors.ListFocus,ListNavigation,ListSelection, andListTypeaheadbehaviors into a single, cohesive class for managing the state and interactions of a list-based component.ListboxPattern,TreePattern,RadioGroupPattern, and any other patterns where it makes sense.The
Listbehavior provides a simplified, high-level API for common list operations, including:next,prev,first,last)rovingandactivedescendant)