This commit is contained in:
@@ -146,24 +146,13 @@
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
let page = 0;
|
||||
let pagesize = 100;
|
||||
while (page >= 0) {
|
||||
const donors = await DonorService.donorControllerGetAll(page, pagesize);
|
||||
if (donors.length == 0) {
|
||||
page = -2;
|
||||
}
|
||||
|
||||
current_donors = current_donors.concat(...donors);
|
||||
options.update((options) => ({
|
||||
...options,
|
||||
data: current_donors,
|
||||
}));
|
||||
|
||||
dataLoaded = true;
|
||||
page++;
|
||||
pagesize += 100;
|
||||
}
|
||||
const donors = await DonorService.donorControllerGetAll();
|
||||
current_donors = donors;
|
||||
options.update((options) => ({
|
||||
...options,
|
||||
data: donors,
|
||||
}));
|
||||
dataLoaded = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user