Added new env option to show all parts on a page by default

Related to discussion #312
This commit is contained in:
Jan Böhmer 2023-07-08 19:32:50 +02:00
parent 91e9c6e048
commit f8e299ec56
6 changed files with 24 additions and 5 deletions

View file

@ -68,11 +68,13 @@ export default class extends Controller {
stateLoadCallback(settings) {
const data = JSON.parse( localStorage.getItem(this.getStateSaveKey()) );
debugger;
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;
delete data.start;
//Reset the data length to the default value by deleting the length property
delete data.length;
}
return data;