ContextMenuComponent
Represents the Kendo UI ContextMenu component for Angular.
@Component({
selector: 'my-app',
template: `
<div #target>
Right-click to open Context menu</p>
</div>
<kendo-contextmenu [target]="target" [items]="items"> </kendo-contextmenu>
`
})
class AppComponent {
public items: any[] = [{ text: 'item1', items: [{ text: 'item1.1' }] }, { text: 'item2', disabled: true }];
}
Selector
kendo-contextmenu
Export Name
Accessible in templates as #kendoContextMenuInstance="kendoContextMenu"
Inputs
Name | Type | Default | Description |
---|---|---|---|
alignToAnchor |
|
|
Indicates that the ContextMenu will be aligned to the target or to the |
anchorAlign |
|
|
Specifies the pivot point of the anchor. Applicable if |
animate |
|
Sets the Menu animation. | |
appendTo |
|
Defines the container to which the popups will be appended. | |
ariaLabel |
|
Sets the value for the | |
collision |
|
|
Configures the collision behavior of the popup. |
filter |
|
Specifies a CSS selector which filters the elements in the target for which the ContextMenu will open (see example). | |
hoverDelay |
|
Specifies the delay in milliseconds before the Menu items are opened or closed on item hover or leave (see example). Used to avoid the accidental opening or closing of the items. | |
items |
|
Specifies the Menu items. | |
openOnClick |
|
Specifies that the root items can be opened only on click (see example). | |
popupAlign |
|
|
Specifies the pivot point of the popup. |
popupAnimate |
|
|
Specifies the popup animation. |
showOn |
|
|
Specifies the event on which the ContextMenu will open (see example).
Accepts the name of a native DOM event. For example, |
size |
|
Sets the Menu size. The possible values are:
| |
target |
|
Specifies the element for which the ContextMenu will open (see example). | |
vertical |
|
|
Specifies if the Menu will be vertically rendered (see example). |
Events
Name | Type | Description |
---|---|---|
close |
|
Fires when a Menu item is closed (see example). |
open |
|
Fires when a Menu item is opened (see example). |
popupClose |
|
Fires when the Menu is closed (see example). |
popupOpen |
|
Fires when the Menu is opened (see example). |
select |
|
Fires when a Menu item is selected (see example). |
Methods
hide |
---|
Hides the ContextMenu. |
show | ||||||
---|---|---|---|---|---|---|
Shows the ContextMenu for the specified target. | ||||||
|