Skip to content

Releases: vaadin/vaadin-context-menu

v1.0.0-alpha1

21 Dec 12:13
Compare
Choose a tag to compare

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

03 Nov 10:53
Compare
Choose a tag to compare

Changes:

  • Overlay coordinates are now correct in iPads

v0.3.0 — Device Detection, sourceEvent Support

19 Oct 12:17
Compare
Choose a tag to compare

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

20 Sep 11:57
Compare
Choose a tag to compare

Changes:

  • --vaadin-context-menu-overlay mixin added for styling the overlay
  • target was renamed to listenOn
  • target-selector has been dropped.
  • Overlay contents are now wrapped inside <template>
  • detail variable is available inside the template to access the detail 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 of listenOn 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 to contextmenu
  • closeOn can be used to customise the event that closes the overlay. Defaults to click

v0.1.0

09 Sep 12:40
Compare
Choose a tag to compare

First first release of vaadin-context-menu with an initial set of features:

  • Bind the contextmenu event to a target element
  • Position by the clicked point
  • Multi selection
  • Configurable auto hide
  • Support for paper-items