Fixing issue with auto checkboxes in data-table

master
Sérgio Gomes 2015-06-19 15:23:33 +01:00
parent 172358f769
commit 6fc0ed2ece
1 changed files with 8 additions and 8 deletions

View File

@ -123,15 +123,15 @@ MaterialDataTable.prototype.init = function() {
var headerCheckbox = this.createCheckbox_(null, rows);
th.appendChild(headerCheckbox);
firstHeader.parentElement.insertBefore(th, firstHeader);
}
for (var i = 0; i < rows.length; i++) {
var firstCell = rows[i].querySelector('td');
if (firstCell) {
var td = document.createElement('td');
var rowCheckbox = this.createCheckbox_(rows[i]);
td.appendChild(rowCheckbox);
rows[i].insertBefore(td, firstCell);
for (var i = 0; i < rows.length; i++) {
var firstCell = rows[i].querySelector('td');
if (firstCell) {
var td = document.createElement('td');
var rowCheckbox = this.createCheckbox_(rows[i]);
td.appendChild(rowCheckbox);
rows[i].insertBefore(td, firstCell);
}
}
}