Skip to main content

DropdownComponent

Used for building dropdown menus.

Example

<vdr-dropdown>
<button class="btn btn-outline" vdrDropdownTrigger>
<clr-icon shape="plus"></clr-icon>
Select type
</button>
<vdr-dropdown-menu vdrPosition="bottom-left">
<button
*ngFor="let typeName of allTypes"
type="button"
vdrDropdownItem
(click)="selectType(typeName)"
>
typeName
</button>
</vdr-dropdown-menu>
</vdr-dropdown>
Signature
class DropdownComponent {
isOpen = false;
public trigger: ElementRef;
@Input() manualToggle = false;
onClick() => ;
toggleOpen() => ;
onOpenChange(callback: (isOpen: boolean) => void) => ;
setTriggerElement(elementRef: ElementRef) => ;
}

isOpen

property

trigger

property
ElementRef

manualToggle

property

onClick

method
() =>

toggleOpen

method
() =>

onOpenChange

method
(callback: (isOpen: boolean) => void) =>

setTriggerElement

method
(elementRef: ElementRef) =>