Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Using select in renderer
Hi,
I am trying ton generate selects in a column (options depend of the data of the row) :
grid.columns[10].renderer = function (cell) {
cell.element.innerHTML = '';
var select = document.createElement('select');
cell.data.blah.forEach(function (e) {
var selectElem = document.createElement('option');
selectElem.innerHTML = e.text;
select.appendChild(selectElem);
});
cell.element.appendChild(select);
};
But, as soon as I click on the select, the event is propagated to the row and it is rendered again, closing the select, so my question is : is there a way to stop the propagation of the events on the select in order to avoid a new rendering ?
Thanks if you can help,
Seb
I fixed it by stopping the propagation of the click event :
select.onclick = function(e) { e.stopPropagation(); };
Sorry about not responding sooner.
Yes, manually stopping the propagation is the correct fix in this case.