You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a very bizzare problem. I am pulling my data from an API through a getData function in increments of 20 per page. The data is coming through so the problem does not lie here. No filters are applied to the data.
I declare my columns through a variable: this.columns = [ { field: "selector", title: "", show: true//, headerTemplateURL: "app/core/headerCheckbox.html" }, { field: "barcode", //filter: {barcode: "text"}, title: "Streckkod", show: true, "class": "list-table-header" }, {...}];
and so on. 12 columns in total. In HTML the table is declared as so:
<table ng-table-dynamic="$ctrl.tableParams with $ctrl.columns" class="table table-hover table-condensed" show-filter="$ctrl.ngTableFilterRowVisible">
Then comes ng-repeat: <tr ng-repeat-start="row in $data" ng-class="{'active' : $ctrl.rowData[$index].isActive }" ng-mouseenter="$ctrl.toggleHover($index)" ng-mouseleave="$ctrl.toggleHover($index)" title="Click for details..">
..followed by a <td></td> pair for each column. Finally
However, no matter how many rows are returned from the getData function, the table refuses to display more than 12 rows, same as the number of columns. In fact, if I reduce the column count to 1, along goes the number of rows!
Only column 1 visible:
Column 1 and 2 visible:
Inspecting the HTML, the reason the rows are not displayed appears to be that the <td></td> elements are not being generated for any rows surpassing the column count (2 in this case):
while a "healthy" row looks like this:
What could possibly be causing this?
Edit
Adding an empty <th></th> before <tr ng-repeat-start..> appears to fix the problem...
<th ng-if=""></th> fixes the problem and gets rid of the unneeded empty row.
The text was updated successfully, but these errors were encountered:
I have a very bizzare problem. I am pulling my data from an API through a getData function in increments of 20 per page. The data is coming through so the problem does not lie here. No filters are applied to the data.
I declare my columns through a variable:
this.columns = [ { field: "selector", title: "", show: true//, headerTemplateURL: "app/core/headerCheckbox.html" }, { field: "barcode", //filter: {barcode: "text"}, title: "Streckkod", show: true, "class": "list-table-header" }, {...}];
and so on. 12 columns in total. In HTML the table is declared as so:
<table ng-table-dynamic="$ctrl.tableParams with $ctrl.columns" class="table table-hover table-condensed" show-filter="$ctrl.ngTableFilterRowVisible">
Then comes ng-repeat:
<tr ng-repeat-start="row in $data" ng-class="{'active' : $ctrl.rowData[$index].isActive }" ng-mouseenter="$ctrl.toggleHover($index)" ng-mouseleave="$ctrl.toggleHover($index)" title="Click for details..">
..followed by a
<td></td>
pair for each column. Finally</tr><tr ng-repeat-end="" class="expandedRow" ng-show="$ctrl.rowData[$index].expandRow"><td colspan="12">Test</td></tr>
However, no matter how many rows are returned from the getData function, the table refuses to display more than 12 rows, same as the number of columns. In fact, if I reduce the column count to 1, along goes the number of rows!
Only column 1 visible:
Column 1 and 2 visible:
Inspecting the HTML, the reason the rows are not displayed appears to be that the
<td></td>
elements are not being generated for any rows surpassing the column count (2 in this case):while a "healthy" row looks like this:
What could possibly be causing this?
Edit
Adding an empty
<th></th>
before<tr ng-repeat-start..>
appears to fix the problem...<th ng-if=""></th>
fixes the problem and gets rid of the unneeded empty row.The text was updated successfully, but these errors were encountered: