-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/overlay
Description
What are you trying to do?
I'm trying to implement a generic auto completion.
My code is structured in following way
dsAutocompletedirective is top level directivedsAutocompleteInputTriggeris directive attached to<input>elementdsAutoCompleteOriginis attached to element on whose drop down need to be anchored*dsAutocompletePanelis a structural directive to define what is dropdown
Flow of actions is
For opening
dsAutocompleteInputTrigger.focus -> dsAutocomplete.openPanel -> overlayRef.attach(TemplatePortal(dsAutocompletePanel)) as FlexibleConnected to dsAutoCompleteOrigin
For closing
dsAutocompleteInputTrigger.focusout -> dsAutocomplete.closePanel -> overlayRef.detach()
when I add an animation directive any where in AutoComplete Panel it only works first time
What troubleshooting steps have you tried?
Tried adding attach and detach in zone.run
Reproduction
follow instruction in following stackblitz
https://stackblitz.com/edit/angular-ivy-smmzcq?file=src%2Fapp%2Fapp.component.html
Environment
- Angular:13.2
- CDK/Material:13.2
- Browser(s):Firefox , Chrome
- Operating System (e.g. Windows, macOS, Ubuntu):Windows 11
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/overlay