fix: use currentFilter.limit when loadMore
This commit is contained in:
parent
23faa707bf
commit
cf0b53c2bf
|
@ -234,8 +234,12 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
|
|
||||||
async function loadMore() {
|
async function loadMore() {
|
||||||
if (!store.hasMoreData) return;
|
if (!store.hasMoreData) return;
|
||||||
|
const isCurrentFilter = JSON.parse(store.currentFilter.filter);
|
||||||
|
|
||||||
store.skip = store.limit * store.page;
|
const limit = isCurrentFilter
|
||||||
|
? isCurrentFilter.limit ?? store.limit
|
||||||
|
: store.limit;
|
||||||
|
store.skip = limit * store.page;
|
||||||
store.page += 1;
|
store.page += 1;
|
||||||
|
|
||||||
await fetch({ append: true });
|
await fetch({ append: true });
|
||||||
|
|
Loading…
Reference in New Issue