Explorar el Código

Update Profile.vue component, fix pagination bug

Daniel Supernault hace 5 años
padre
commit
46767810a4
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      resources/assets/js/components/Profile.vue

+ 6 - 1
resources/assets/js/components/Profile.vue

@@ -760,8 +760,13 @@
 								self.ids.push(d.id);
 								self.ids.push(d.id);
 							} 
 							} 
 						});
 						});
+						let max = Math.min(...this.ids);
+						if(max == this.max_id) {
+							$state.complete();
+							return;
+						}
 						this.min_id = Math.max(...this.ids);
 						this.min_id = Math.max(...this.ids);
-						this.max_id = Math.min(...this.ids);
+						this.max_id = max;
 						$state.loaded();
 						$state.loaded();
 						this.loading = false;
 						this.loading = false;
 					} else {
 					} else {