packages/eui/packages/components/eui-dropdown/eui-dropdown.component.ts
The eui-dropdown component is composed of a trigger, usually a button, which allows to display the dropdown content specified with the eui-dropdown-content.
OnInit
OnDestroy
AfterViewInit
changeDetection | ChangeDetectionStrategy.OnPush |
encapsulation | ViewEncapsulation.None |
selector | eui-dropdown |
imports |
OverlayModule
ScrollingModule
A11yModule
ObserversModule
|
templateUrl | ./eui-dropdown.component.html |
styleUrl | ./eui-dropdown.scss |
Properties |
Methods |
|
Inputs |
Outputs |
HostBindings |
Accessors |
e2eAttr |
Type : string
|
Default value : 'eui-dropdown'
|
Sets the |
euiDisabled |
Type : boolean
|
Default value : false
|
hasClosedOnClickInside |
Type : boolean
|
Default value : true
|
Sets the |
hasTabNavigation |
Type : boolean
|
Default value : false
|
Sets the |
height |
Type : string
|
Default value : 'auto'
|
Sets the |
isBlock |
Type : boolean
|
Default value : false
|
Sets the |
isDropDownRightAligned |
Type : boolean
|
Default value : false
|
Sets the |
isExpandOnHover |
Type : boolean
|
Default value : false
|
Sets the |
isLabelUpdatedFromSelectedItem |
Type : boolean
|
Default value : false
|
Sets the |
isRightClickEnabled |
Type : boolean
|
Default value : false
|
Sets the |
position |
Type : "top" | "right" | "bottom" | "left"
|
Default value : 'bottom'
|
Sets the |
subDropdownPosition |
Type : "right" | "left"
|
Default value : 'right'
|
Sets the |
tabIndex |
Type : number
|
Default value : -1
|
Sets the |
width |
Type : string
|
Default value : 'auto'
|
Sets the |
expand |
Type : EventEmitter<boolean>
|
Event emitted when the menu expands. |
class |
Type : string
|
Public closeDropdown | ||||||||
closeDropdown(recursively)
|
||||||||
Close a dropdown
Parameters :
Returns :
void
|
Public createKeyboardHandlerSubscription |
createKeyboardHandlerSubscription()
|
Handles the keyboard navigation on the menu items upon opening the dropdown.
Returns :
void
|
Public onClick |
onClick()
|
Method fired upon clicking the dropdown content.
Returns :
void
|
Public onTriggerClicked | ||||||||
onTriggerClicked(e: Event)
|
||||||||
Method fired upon clicking the dropdown trigger.
Parameters :
Returns :
void
|
Public onTriggerRightClicked | ||||||||
onTriggerRightClicked(e: Event)
|
||||||||
Method fired upon right clicking the dropdown trigger in case of context menu.
Parameters :
Returns :
void
|
Public openDropdown | ||||||||||||
openDropdown(origin: HTMLElement, position?: literal type)
|
||||||||||||
Method fired when the dropdown is opened.
Parameters :
Returns :
void
|
Public projectContentChanged |
projectContentChanged()
|
Method fired when the dropdown content is changed.
Returns :
void
|
Public setParentDropdown | ||||||||
setParentDropdown(parentDropdown: EuiDropdownComponent)
|
||||||||
Sets the parent dropdown for a sub-dropdown.
Parameters :
Returns :
void
|
euiDropdownItems |
Type : QueryList<>
|
Decorators :
@ContentChildren(EuiDropdownItemComponent, {descendants: true})
|
Public parentDropdown |
Type : EuiDropdownComponent
|
templatePortalContent |
Type : TemplateRef<>
|
Decorators :
@ViewChild('templatePortalContent')
|
Public trapFocusAutoCapture |
Default value : true
|
triggerRef |
Type : ElementRef<HTMLElement>
|
Decorators :
@ViewChild('triggerRef')
|
cssClasses |
getcssClasses()
|
Computes and returns the CSS classes for the component based on its current state.
Returns :
string
|
isOpen |
getisOpen()
|
Whether the eui-dropdown is open. Example :
Returns :
boolean
|