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.

No problem, thank you ! :slight_smile: