stat2025 commited on
Commit
8db9a13
·
verified ·
1 Parent(s): 95264f5

Update script.js

Browse files
Files changed (1) hide show
  1. script.js +13 -1
script.js CHANGED
@@ -12,7 +12,19 @@ const loading = document.getElementById("loading");
12
  let data = [];
13
  let filtered = [];
14
  let currentPage = 1;
15
- let rowsPerPage = parseInt(pageSizeEl.value, 10);
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  // ألوان جانبية
18
  const colors = ["#00bcd4","#4caf50","#f44336","#ff9800","#9c27b0","#e91e63","#009688","#3f51b5","#607d8b","#795548"];
 
12
  let data = [];
13
  let filtered = [];
14
  let currentPage = 1;
15
+ const DEFAULT_PAGE_SIZE = 25; // الافتراضي المطلوب
16
+ let rowsPerPage = DEFAULT_PAGE_SIZE;
17
+
18
+ // لو فيه قائمة حجم موجودة، عيّنيها على 25 فورًا
19
+ if (pageSizeEl) pageSizeEl.value = String(DEFAULT_PAGE_SIZE);
20
+
21
+ // (اختياري) لو ودك يحفظ اختيار المستخدم بعدين:
22
+ // const saved = localStorage.getItem('pageSize');
23
+ // if (saved) {
24
+ // rowsPerPage = parseInt(saved, 10) || DEFAULT_PAGE_SIZE;
25
+ // if (pageSizeEl) pageSizeEl.value = String(rowsPerPage);
26
+ // }
27
+
28
 
29
  // ألوان جانبية
30
  const colors = ["#00bcd4","#4caf50","#f44336","#ff9800","#9c27b0","#e91e63","#009688","#3f51b5","#607d8b","#795548"];