mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Added new env option to show all parts on a page by default
Related to discussion #312
This commit is contained in:
parent
91e9c6e048
commit
f8e299ec56
6 changed files with 24 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue