PagingType (full_numbers) and Buttons extension not working together
See original GitHub issueI’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
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:15 (2 by maintainers)
Top Results From Across the Web
pagingType does not seem to work
Here's my code. I'd like to display the page buttons as in this example https://datatables.net/examples/basic_init/alt_pagination.html.
Read more >javascript - Datatables Editor pagingType not working
Look at the source code that loads. There is no "pagingType" . Change it to input so we can see the output when...
Read more >DataTables pagingType Option
DataTables is a jQuery plugin that can be used for adding ... 'Next' and 'Last' buttons are displayed. full_numbers: In this type of...
Read more >Displaying Pages Without Ellipses In The Pagination ...
Full Numbers No Ellipses Plugin offers the same functionality as fullnumbers pagination type see pagingType option but without ellipses. See example for.
Read more >DataTables example - Alternative pagination
Furthermore, how the buttons are actually shown can be altered through the use of plug-in pagination renderers. The example below shows the full_numbers...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Experiencing this issue too, can this be fixed?
Experiencing the same issue !!