core/common/dropdown-direction.directive.ts
A directive to determine if a dropdown should open to the top or as usual to the bottom. This directive has a direct dependency to the bootstrap dropdown (!)
Preconditions:
<div dropdown class="dropdown">
<button class="dropdown-toggle" dropdownToggle>Toggle</button>
<ul class="dropdown-menu" *dropdownMenu>
<!-- Content here -->
</ul>
</div>
Example:
<div dropdown c8yBsDropdownDirection class="dropdown">
<button class="dropdown-toggle" dropdownToggle>Toggle</button>
<ul class="dropdown-menu" *dropdownMenu>
<!-- Content here -->
</ul>
</div>
You make use of the bootstrap dropdown as usual and additionally add the direction directive to it.
Selector | [dropdown][c8yBsDropdownDirection],[dropdown][c8yDropdownDirection] |
Methods |
HostListeners |
constructor(elementRef: ElementRef, renderer: Renderer2)
|
|||||||||
Parameters :
|
click |
onClick |
onClick()
|
Decorators :
@HostListener('click')
|
Returns :
void
|