diff --git a/src/positioning/ng-positioning.ts b/src/positioning/ng-positioning.ts index c9cd5dc442..9fcf9a754c 100644 --- a/src/positioning/ng-positioning.ts +++ b/src/positioning/ng-positioning.ts @@ -83,8 +83,8 @@ export class Positioning { bottom: hostElPosition.top + hostElPosition.height }; const targetElBCR = targetElement.getBoundingClientRect(); - const placementPrimary = placement.split('-')[0] || 'top'; - const placementSecondary = placement.split('-')[1] || 'center'; + const placementPrimary = placement.split(' ')[0] || 'top'; + const placementSecondary = placement.split(' ')[1] || 'center'; let targetElPosition: ClientRect = { height: targetElBCR.height || targetElement.offsetHeight, diff --git a/src/typeahead/typeahead-container.component.ts b/src/typeahead/typeahead-container.component.ts index 9d5a826b9b..d92e54e7b6 100644 --- a/src/typeahead/typeahead-container.component.ts +++ b/src/typeahead/typeahead-container.component.ts @@ -60,7 +60,7 @@ import { TypeaheadMatch } from './typeahead-match.class'; `, // tslint:disable-next-line - host: {'[class]': '"dropdown open"'}, + host: {'class': 'dropdown open', style: 'position: absolute;' }, encapsulation: ViewEncapsulation.None }) export class TypeaheadContainerComponent { diff --git a/src/typeahead/typeahead.directive.ts b/src/typeahead/typeahead.directive.ts index 5cabc8a686..c8669a9a8a 100644 --- a/src/typeahead/typeahead.directive.ts +++ b/src/typeahead/typeahead.directive.ts @@ -217,8 +217,8 @@ export class TypeaheadDirective implements OnInit, OnDestroy { this._typeahead .attach(TypeaheadContainerComponent) // todo: add append to body, after updating positioning service - // .to(this.container) - // .position({attachment: 'bottom left'}) + .to(this.container) + .position({attachment: 'bottom left'}) .show({ typeaheadRef: this, placement: this.placement,