Tree grid lazy loading and component renderer

Hello,

Got an issue when using a tree grid and fetching data with lazy loading (vaadin 14.04).

My tree grid is initialized (as in screenshot_1) with one node expanded and multiple children collapsed.
When I expand a child which have 2 children (see screenshot_2), then collapse it again and finally select another child row I ended with screenshot 3: the last two rows are not displaying iconRenderer (fields added using grid.addColumn((new IconRenderer<>(item → myItem.getItemComponent(item),item → “”)))).

If I have had expanded a child with 3 children in the first place it would have been the last three rows which have been impacted.

However if I use a basic way of rendering the field like addColumn(myItem::getMyField) it works without troubles (screenshot_4).

Do you have an idea what is the problem behind this ?

Thank you in advance for your consideration.
Best regards,
Lucien
17835188.png
17835191.png
17835194.png
17835197.png

I got rid of the lazy loading and the problem remains.

Any ideas ?

BR,
Lucien

Also try to use ComponentRenderer as described in the Grid documentation page :
grid.addColumn(new ComponentRenderer<>(person → {
if (person.getGender() == Gender.MALE) {
return new Icon(VaadinIcon.MALE);
} else {
return new Icon(VaadinIcon.FEMALE);
}
})).setHeader(“Gender”);

But it doesn’t work for TreeGrid neither.

Need some help please.

BR,
Lucien