furo-ui5-context-menu #
@furo/ui5 v1.18.0
import '@furo/ui5/src/furo-ui5-context-menu.js';
exports FuroUi5ContextMenu js
exports <furo-ui5-context-menu>
custom-element-definition
superclass LitElement
mixes FBP
Summary: Context menu
Description #
furo-ui5-context-menu is a context menu or menu element.
A furo-ui5-context-menu-display
element must be inserted in one of the parent elements of the element where you
use the furo-ui5-context-menu
. The app-shell or even body is a good place for that.
furo-ui5-context-menu
uses diplay:inline, do not forget to change it to display:block if you place it around a block level element.
|
|
Data signature #
|
|
Minimal data signature #
|
|
Example #
Note The demo is a little bit broken, because of the scrolling position of the documentation system. Scroll up to see the menu after you opened it.
|
|
Attributes and Properties #
Events #
menu-item-selected #
at-menu-item-selected
→ {context, menuitem}
Fired when a menu item is selected.
Methods #
bindData #
bindData(menu `` ** Fieldnode
) ⟹ void
`` Fieldnode
→
fn-bind-data
Bind your menu object.
- menu
- || RepeaterNode} menu with
menu.Menuitem
signature
setContext #
setContext(ctx *
) ⟹ void
*
→
fn-set-context
Sets the context. Use this if you want to set a Object as context
- ctx Can be anything, will be returned at the menu-item-selected method
trigger #
trigger(byKeyboard `` ) ⟹ void
`` → fn-trigger
Triggers the context menu. Set by keyboard to true to focus the first element for keyboard navigation
- byKeyboard
triggerContext #
triggerContext(context Object
byKeyboard `` ) ⟹ void
Object
`` →
fn-trigger-context
triggers the menu with context
- context
- byKeyboard
Slots #
default #
Type: HTMLElement
default slot to add an individual context menu opener component (e.g. furo-icon-button).