forked from ng-bootstrap/ng-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(typeahead): enable override of the container for the live element
Enable the override of the container for the live element, through a DI token, meaning that the Live service is not provided in root anymore and needs to be provided when used in a component. Fixes ng-bootstrap#4560
- Loading branch information
Jeremy CHOISY
committed
Jan 22, 2024
1 parent
b5d5feb
commit b5203bd
Showing
4 changed files
with
71 additions
and
33 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { ElementRef } from '@angular/core'; | ||
|
||
export function getShadowRootContainerIfAny(elementRef: ElementRef): Node | null { | ||
const _nativeElement = elementRef.nativeElement as HTMLInputElement; | ||
const rootNode = _nativeElement.getRootNode(); | ||
return rootNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? rootNode : null; | ||
} |
This file contains 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
This file contains 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