@@ -167,13 +167,27 @@
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  onMount(async () => {
 | 
			
		||||
    const donations = await DonationService.donationControllerGetAll();
 | 
			
		||||
    current_donations = donations;
 | 
			
		||||
    options.update((options) => ({
 | 
			
		||||
      ...options,
 | 
			
		||||
      data: current_donations,
 | 
			
		||||
    }));
 | 
			
		||||
    dataLoaded = true;
 | 
			
		||||
    let page = 0;
 | 
			
		||||
    let pagesize = 100;
 | 
			
		||||
    while (page >= 0) {
 | 
			
		||||
      const donations = await DonationService.donationControllerGetAll(
 | 
			
		||||
        page,
 | 
			
		||||
        pagesize
 | 
			
		||||
      );
 | 
			
		||||
      if (donations.length == 0) {
 | 
			
		||||
        page = -2;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      current_donations = current_donations.concat(...donations);
 | 
			
		||||
      options.update((options) => ({
 | 
			
		||||
        ...options,
 | 
			
		||||
        data: current_donations,
 | 
			
		||||
      }));
 | 
			
		||||
 | 
			
		||||
      dataLoaded = true;
 | 
			
		||||
      page++;
 | 
			
		||||
      pagesize += 100;
 | 
			
		||||
    }
 | 
			
		||||
  });
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user