mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-09 03:04:54 -04:00
fix: infinite scroll bug on all recipes page (#1393)
This commit is contained in:
parent
3f808f8f00
commit
9e261f5235
@ -23,8 +23,9 @@ export default defineComponent({
|
||||
components: { RecipeCardSection },
|
||||
setup() {
|
||||
const start = ref(0);
|
||||
const limit = ref(30);
|
||||
const increment = ref(30);
|
||||
const offset = ref(increment.value);
|
||||
const limit = ref(increment.value);
|
||||
const ready = ref(false);
|
||||
const loading = ref(false);
|
||||
|
||||
@ -40,8 +41,8 @@ export default defineComponent({
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
start.value = limit.value + 1;
|
||||
limit.value = limit.value + increment.value;
|
||||
start.value = offset.value + 1;
|
||||
offset.value = offset.value + increment.value;
|
||||
fetchMore(start.value, limit.value);
|
||||
loading.value = false;
|
||||
}, 500);
|
||||
@ -64,4 +65,3 @@ export default defineComponent({
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user