Releases: vaadin/vaadin-context-menu
Releases · vaadin/vaadin-context-menu
v1.0.0-alpha1
Overview
<vaadin-context-menu>
is an element implementing a menu in an overlay which by default is opened by a context click or a long press touch event.
<vaadin-context-menu>
<template>
<paper-menu>
<paper-item>First menu item</paper-item>
<paper-item>Second menu item</paper-item>
</paper-menu>
</template>
</vaadin-context-menu>
Features
- Uses template to define the menu overlay contents
- Supports data bindings to the context in the menu template
- Opens on both mouse and touch environments
- Automatic fullscreen mode for small viewports
- Configurable opening and closing events, event listener element
- Provides both declarative HTML and imperative JavaScript APIs
Demos and documentation
v0.3.1 – iOS Fixes
Changes:
- Overlay coordinates are now correct in iPads
v0.3.0 — Device Detection, sourceEvent Support
Changes
- Detect phones based on touch support and device width
- Fix tests
- Remove unnecessary flex boxes and explicit width
- Add sourceEvent property
- Make opened private
- Rename _onContextMenu to open
- More readable code
- Accept a context in the open method. Consider detail.event in position
- Fix example in IE11
- CSS fixes
- Replace ES2016 includes call (not supported in IE) with indexOf
- Avoid unnecessary calls to _selectedChanged
- Use default cursor for menu items
v0.2.0 – Touch Support, Context added
Changes:
--vaadin-context-menu-overlay
mixin added for styling the overlaytarget
was renamed tolistenOn
target-selector
has been dropped.- Overlay contents are now wrapped inside
<template>
detail
variable is available inside the template to access thedetail
of the event that opened the context menu.target
variable is available inside the template to access the target context element.context-selector
is a CSS selector that can be used to filter which child elements oflistenOn
can open the menu. Applies only to the childs inside light DOM.openOn
can be used to customise the event that opens the overlay. Defaults tocontextmenu
closeOn
can be used to customise the event that closes the overlay. Defaults toclick