fix(aria/combobox): replace manual popover usage with cdkConnectedOverlay attach/detach pattern#32750
Open
shivdev277 wants to merge 9 commits intoangular:mainfrom
Open
fix(aria/combobox): replace manual popover usage with cdkConnectedOverlay attach/detach pattern#32750shivdev277 wants to merge 9 commits intoangular:mainfrom
shivdev277 wants to merge 9 commits intoangular:mainfrom
Conversation
- Add new section explaining the usePopover option - Include code examples for basic and advanced usage - List benefits of using the native Popover API - Add browser compatibility note Closes #<issue-number>
- Add new section explaining the usePopover configuration option - Include code examples for basic and advanced usage patterns - List benefits of using the native Popover API - Add browser compatibility notes for older browsers
…e popover/inline insertion)
…els instead of manual popover
…nstead of manual popover
…rlay attach/detach pattern
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What's the issue?
The combobox and autocomplete examples were rendering their panels in the DOM as always-visible elements, then hiding them with CSS. This is inefficient and inconsistent with how other overlays (menus, selects, etc.) work in the codebase.
What did I change?
Replaced the manual popover API usage with cdkConnectedOverlay. Instead of keeping a hidden
Specific changes:
Removed
Removed the popover ViewChild and the manual showPopover() methods.
Added a panelWidth signal to preserve the input's width when the panel is attached.
Bind the overlay's [open], [width], and [origin] to the component state.
Files updated:
combobox-manual, combobox-auto-select, combobox-disabled, combobox-highlight
combobox-tree-manual, combobox-tree-auto-select, combobox-tree-highlight
simple-toolbar.ts (toolbar combobox example)