Responsive Datatable with server-side pagination in angular 6

Responsive Datatable with server-side pagination in angular 6

komalshah1987komalshah1987 Posts: 5Questions: 2Answers: 0
edited April 2019 in Free community support
this.dtOptions = {
          pagingType: 'full_numbers',
          pageLength: 2,
          serverSide: true,
          processing: true,
           
          ajax: (dataTablesParameters: any, callback) => {
            that.http
              .post<DataTablesResponse>(
                'https://angular-datatables-demo-server.herokuapp.com/',
                dataTablesParameters, {}
              ).subscribe(resp => {
                that.persons = resp.data;
     
                callback({
                  recordsTotal: resp.recordsTotal,
                  recordsFiltered: resp.recordsFiltered,
                  data: []
                });
              });
          },
          responsive:true,
          columns: [{ data: 'id' }, { data: 'firstName' }, { data: 'lastName' }]
        };

Below is the link of stackblitz stating the problem :- https://stackblitz.com/edit/responsive-server-side-1264

Answers

  • colincolin Posts: 12,875Questions: 0Answers: 2,198

    Is this the same issue as your other thread here?

This discussion has been closed.