Unable to select row by clicking a Layout within a cell

Hello,

I placed a HorizontalLayou in a table cell to that i can have multiple components in it.


HorizontalLayout layout = new HorizontalLayout();
layout.addComponent(new Label("some text"));
layout.addComponent(new TextField());
table.getContainerProperty(id, HEADER0).setValue(layout);

When i click on the label “some text” the row does not get selected.

But it seems to work fine when i just use plain string inside the cell.

Thanks in advance,

Most likely the layout is consuming the click event. You could try adding a click listener to the horizontal layout and in it manually select the row.