Properly reset the page length when reloading a datatable

Fixes issue #309
This commit is contained in:
Jan Böhmer 2023-07-02 19:44:26 +02:00
parent 2b793bf242
commit 7b87b00b44

View file

@ -71,6 +71,8 @@ export default class extends Controller {
if (data) {
//Do not save the start value (current page), as we want to always start at the first page on a page reload
data.start = 0;
//50 is the default length supplied by datatables, reset it to that value
data.length = 50;
}
return data;