angular-scrollable-table icon indicating copy to clipboard operation
angular-scrollable-table copied to clipboard

Multiline header w/o ellipsis

Open Pumych opened this issue 7 years ago • 2 comments

Is there any known CSS solution for dynamic header size without ellipsis. I see the only solution with watcher, any suggestions?

Pumych avatar Mar 01 '17 15:03 Pumych

Have you find any solution ? When i try to use filters headers get distorted.

rkhatri1406 avatar Mar 15 '17 11:03 rkhatri1406

Here is a quick and dirty solution that works for me, I run it on get data callback:

function alignHeadersHeight(){ 
            var items = angular.element('th .title');
            var maxHeight = 0;

            for(var i=0; i<items.length; i++){
                maxHeight = items[i].offsetHeight > maxHeight ? items[i].offsetHeight : maxHeight;
            }

            $('.scrollableContainer').css('padding-top', maxHeight+'px');
            $('.scrollableContainer .headerSpacer').css('height', maxHeight+'px');
            $('.scrollableContainer .th-inner').css('height', maxHeight+'px');
        }

Pumych avatar Apr 25 '17 08:04 Pumych