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

Mixed display when updating the set of items. #10

Closed JoshuaKissoon closed 9 years ago

JoshuaKissoon commented 9 years ago

In the initial page load, the table is displayed well and spans the width of the page. However, if I re-load the content via ajax, the display is not clean in that it does not take up the full page width. The body is also positioned differently from the rest of the data. screenshot 2015-03-04 12 25 57

talski commented 9 years ago

I found a workaround, it's ugly, but it works:

add a empty row at the top of tbody

<tbody>
    <tr class="table-header-first-row"><td></td><td></td><td></td></tr>

add columns as needed, and use the following css

.table-header-first-row, .table-header-first-row td {
  margin: 0px !important;
  padding: 0px !important;
  border: 0px !important;
  height: 0px !important;
}

Just remember to not remove this line when you update the table content

cornflourblue commented 9 years ago

This should be fixed now, I updated the directive to watch for when the data is updated and reformat the table.