Class GridContextMenu.GridContextMenuItemClickEvent<T>

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<GridMenuItem<T>>
com.vaadin.flow.component.grid.contextmenu.GridContextMenu.GridContextMenuItemClickEvent<T>
All Implemented Interfaces:
Serializable
Enclosing class:
GridContextMenu<T>

public static class GridContextMenu.GridContextMenuItemClickEvent<T> extends ComponentEvent<GridMenuItem<T>>
Event that is fired when a GridMenuItem is clicked inside a GridContextMenu.
Author:
Vaadin Ltd.
See Also:
  • Method Details

    • getGrid

      public Grid<T> getGrid()
      Gets the Grid that the context menu is connected to.
      Returns:
      the Grid that the context menu is connected to.
    • getItem

      public Optional<T> getItem()
      Gets the item in the Grid that was the target of the context-click, or an empty Optional if the context-click didn't target any item in the Grid (eg. if targeting a header).
      Returns:
      the target item of the context-click