question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PagingType (full_numbers) and Buttons extension not working together

See original GitHub issue

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.

image

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:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
leonelngandecommented, Aug 3, 2018

Experiencing this issue too, can this be fixed?

1reaction
ng-modelcommented, Aug 13, 2018

Experiencing the same issue !!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found