mirror of
https://github.com/rommapp/romm.git
synced 2026-12-02 10:08:40 +01:00
store romsPerPage in localStorage
This commit is contained in:
@@ -78,7 +78,8 @@ const downloadStore = storeDownload();
|
||||
const romsStore = storeRoms();
|
||||
const auth = storeAuth();
|
||||
const page = ref(1);
|
||||
const romsPerPage = ref(10);
|
||||
const storedRomsPerPage = parseInt(localStorage.getItem("romsPerPage") ?? "");
|
||||
const romsPerPage = ref(isNaN(storedRomsPerPage) ? 25 : storedRomsPerPage);
|
||||
const pageCount = ref(0);
|
||||
|
||||
// Functions
|
||||
@@ -93,6 +94,7 @@ function updateDataTablePages() {
|
||||
}
|
||||
|
||||
watch(romsPerPage, async () => {
|
||||
localStorage.setItem("romsPerPage", romsPerPage.value.toString());
|
||||
updateDataTablePages();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user