refactor(web): debounce pagination to avoid callback spam

This commit is contained in:
Luke committed 2023-03-26 13:16:18 +02:00
1 parent 109344e097
commit abe50d59e7
2 files changed
+11 -3

No files matched your search

@@ -12,7 +12,7 @@
import { writable } from 'svelte/store';
import { meta } from 'tinro';
import { fetchNui } from '../../../utils/fetchNui';
import { tablePage } from '../../../store';
import { debouncedTablePage } from '../../../store';
const route = meta();
@@ -68,7 +68,7 @@
$: {
fetchNui('fetchResource', {
resource: route.params.resource,
pageIndex: $tablePage,
pageIndex: $debouncedTablePage,
sortBy: sorting,
});
}