daniel-nagy / md-data-table

Material Design Data Table for Angular Material
MIT License
1.9k stars 520 forks source link

md-progress doesn't take full table width when thead with multiple tr are used #622

Open Bad-Y opened 6 years ago

Bad-Y commented 6 years ago

Hello,

When using multiple tr in the thead with the attribute "row-span" the progress will take less than 100% of the table width.

Here is a codepen to demonstate the issue.

I think that I've found the issue in the column counter function that counts only the last tr cells :

https://github.com/daniel-nagy/md-data-table/blob/master/src/scripts/mdTable.js#L104

self.columnCount = function () {
      return self.getRows($element[0]).reduce(function (count, row) {
        return row.cells.length > count ? row.cells.length : count;
      }, 0);
    };