fix(nui): Data fetching into manual pagination

Perhaps don't need the loading state...?
This commit is contained in:
Luke committed 2022-01-04 22:04:13 +01:00
1 parent 7560099231
commit 238d7cd589
4 files changed
+60 -50

No files matched your search

+3 -2
View File
@@ -51,8 +51,9 @@ RegisterCommand(
onNet(`oxmysql:fetchResource`, (data: {resource: string, pageIndex: number}) => {
if (typeof data.resource !== 'string') return;
const queries = logStorage[data.resource].slice(data.pageIndex * 12, data.pageIndex + 12)
const startRow = data.pageIndex * 12
const endRow = startRow + 12
const queries = logStorage[data.resource].slice(startRow, endRow)
const pageCount = Math.ceil(logStorage[data.resource].length / 12)
if (!queries) return;