peergynt / vaadin-lazytooltip

Lazy Tooltip Add-on for Vaadin
Apache License 2.0
1 stars 2 forks source link

Grid tooltips do not display #1

Open drewharvey opened 8 years ago

drewharvey commented 8 years ago

Grid.setRowDescriptionGenerator() and Grid.setColumnDescriptionGenerator() tooltips do not display. When you hover over a grid row/cell nothing happens.

// Example grid where tooltips are not displayed but should be:
Grid g = new Grid();
g.addColumn("c1");
g.addColumn("c2");
g.addRow("row 1", "cell 1.1");
g.addRow("row 2", "cell 2.1");
g.setRowDescriptionGenerator(rowRef -> {
  return "This is a roll description";
});

A solution maybe to change line VLazyTooltip.handleShowHide(..)

// code inside handleShowHide method
if (nativeEvent) {
  // we need to get the cell that mouseover event occurred on, 
  // so we shouldn't be jumping to the parent immediately
  element = Element.as(event.getEventTarget());
  // original:
  // Widget widget = getParentWidget(Element.as(event.getEventTarget()));
  // if (widget != null) {
  //   element = widget.getElement();
  // }
}
peergynt commented 8 years ago

Thanks for pointing this out. I need to update VLazyTooltip with the changes from VTooltip since vaadin 7.4. This should fix the problem with the Grid description generator.