I found out that when using pagination in md-table, the header cells width is not always correct.
I switch to page 2 for example, but the header cells do not adapt to the new table layout.
To fix that, you just have to use angulars $timeout function as a wrapper in your setWidth function:
var setWidth = function () {
$timeout(function () {
marginTop(height());
clone.css({
minWidth: style.width,
maxWidth: style.width
});
});
};
Obviously $timeout also has to be listed in the $inject array and function parameters
I found out that when using pagination in md-table, the header cells width is not always correct. I switch to page 2 for example, but the header cells do not adapt to the new table layout.
To fix that, you just have to use angulars
$timeout
function as a wrapper in yoursetWidth
function:Obviously
$timeout
also has to be listed in the$inject
array and function parameters