TreeGrid itemClickListener not working properly

Hi, I have a TreeGrid with 3 levels sort of like :

  • first
    • second
      • leaf
      • leaf
      • leaf
  • first
    • second
      • etc

And I would like to add some information to the leaf (not important) when I click on the second level. The problem is that the itemClickListener works only when I click in the far right of the cell. If I click normally on the cell it just expands and the listener doesn’t consider it a click.

Is there anyway I can fix this, or use another type of listener. Also, I need access to the clicked item. I tried using the expand listener but it only gives access to the treegrid and the leafs.

Hi,
Exact the same situation I am currently having. SelectionListner/ItemClicklistner are only called for leaf nodes and root nodes. for nodes having child nodes, the event is not fired.
This is quite problematic for migration project. Since the tree component is not there and the only choice is the TreeGrid.

Thanks and Regards

Have you checked the discussion here?

https://github.com/vaadin/vaadin-grid-flow/issues/742