cornflourblue / angu-fixed-header-table

AngularJS fixed header scrollable table directive
http://pointblankdevelopment.com.au/blog/angularjs-fixed-header-scrollable-table-directive
MIT License
67 stars 43 forks source link

Firstchild always null #25

Open kensplanet opened 8 years ago

kensplanet commented 8 years ago

There is a piece of code in angu-fixed-header-table.js

       $scope.$watch(tableDataLoaded, function(isTableDataLoaded) {
            if (isTableDataLoaded) {
                transformTable();
            }
        });

        function tableDataLoaded() {
            // first cell in the tbody exists when data is loaded but doesn't have a width
            // until after the table is transformed
            var firstCell = elem.querySelector('tbody tr:first-child td:first-child');
            return firstCell && !firstCell.style.width;
        }

The problem is my firstChild is always null, and doesn't have a value. So, my table is never transformed and the directive doesn't work for me.

marsuaga44 commented 8 years ago

I have the same issue... Were you able to fix it?

kensplanet commented 8 years ago

No. I had to use a different approach,