angular-datatables: PagingType (full_numbers) and Buttons extension not working together
I’m submitting a…
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[x] Question
Current behavior
When using the Buttons extension, it overrides the pagingType options (full_numbers) in the HTML view. Both options can’t be used at the same time. The pageLength option still works.
Expected behavior
I would like to be able to use the buttons extension while having the ability to chose the number of rows to display. Is it something possible ? Let me know if it’s a datatables.net thing.
Minimal reproduction of the problem with instructions
HTML:
<table datatable [dtOptions]="dtOptions" [dtTrigger]="dtTrigger"
class="row-border hover responsive">
<thead>
<tr>
<th> Series </th>
<th *ngFor="let element of elements">{{element.symbol}}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let key of keys">
<td>{{key}}</td>
<td *ngFor="let cert of dataSourceCerts[key]">{{cert.precision === null ? '' : (cert.certifiedAvg | number: '1.' + cert.precision +'-'+ cert.precision)}}</td>
</tr>
</tbody>
</table>
Typescript:
dtOptions: any = {};
dtTrigger: Subject<any> = new Subject();
ngOnInit() {
this.dtOptions = {
pagingType: 'full_numbers',
pageLength: 10,
dom: 'Bfrtip',
buttons: [
'excel',
'print'
]
};
}
ngOnDestroy(): void {
this.dtTrigger.unsubscribe();
}
Environment
- node version: 8.11.1
- angular version: 6.0.4
- angular-cli version: 6.0.8
- jquery version: 3.3.1
- datatables version: 1.10.16
- angular-datatables version: 6.0.0
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 15 (2 by maintainers)
Experiencing this issue too, can this be fixed?
Experiencing the same issue !!