I implement a data table and use MongoDb, Angular -Js. Data table displaying a maximum of 1000 rows. If the API has 999 entries, it displays 999 lines; if the API has 1001, it displays only 1000 lines. If the API has 2000, then it also displays 1000.
$scope.standardOptions = DTOptionsBuilder
.fromFnPromise(R.all('----api call--').getList())
.withDOM("<'dt-toolbar'<'col-xs-12 col-sm-6'f><'col-sm-6 col-xs-12 hidden-xs'l>r>" +
"t" +
"<'dt-toolbar-footer'<'col-sm-6 col-xs-12 hidden-xs'i><'col-xs-12 col-sm-6'p>>")
.withBootstrap();
$scope.standardColumns = [
DTColumnBuilder.newColumn('flightNo').withOption('defaultContent', '-'),
DTColumnBuilder.newColumn('eta').renderWith(dataRendererETA).withOption('defaultContent', '-'),
DTColumnBuilder.newColumn('etd').renderWith(dataRendererETA).withOption('defaultContent', '-'),
];
HTML
<div class="widget-body no-padding">
<table datatable dt-options="datatables.standardOptions" dt-columns="datatables.standardColumns" class="table table-striped table-bordered table-hover" width="100%">
<thead>
<tr>
<th>Flight no.</th>
<th>eta</th>
<th> etd</th>
</tr>
</thead>
</table>
</div>
My API has over 1000 entries. Since I can get the whole record in the data table.

source
share