This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Description
🪲 bug report
pageLength = 2 not returning expected result on datatable
ngOnInit(): void {
const that = this;
this.dtOptions = {
pagingType: 'full_numbers',
pageLength: 2, // this should return datatable of page length 2
serverSide: true,
processing: true,
ajax: (dataTablesParameters: any, callback) => {
that.http
.post<DataTablesResponse>(
environment.api_url + `job/manpower`,
dataTablesParameters,
{}
)
.subscribe((res: any) => {
that.jobs = res.data;
callback({
recordsTotal: res.recordsTotal,
data: [],
});
});
},
columns: [{ data: 'id' }, { data: 'title.en' }],
};
}
server api response

request payload

datatables shows more than 2 records

- NodeJS version: 14.15.1
- Angular version: 13.1.0
- Angular CLI version: 13.1.0
- jQuery version: ^3.6.0
- DataTables version: 1.11.3
- angular-datatables version: ^13.0.1
any help is Appreciated
Sri Zn