feat: following (#22)
This commit is contained in:
parent
f97920d9d2
commit
9aa7243d43
4 changed files with 46 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { Ref } from 'vue'
|
||||
import type { Paginator } from 'masto'
|
||||
|
||||
const { paginator, keyProp = 'id' } = defineProps<{
|
||||
|
@ -6,7 +7,13 @@ const { paginator, keyProp = 'id' } = defineProps<{
|
|||
keyProp?: string
|
||||
}>()
|
||||
|
||||
const { items, state, endAnchor, error } = usePaginator(paginator)
|
||||
const emit = defineEmits(['items'])
|
||||
|
||||
const { items, newItems, state, endAnchor, error } = usePaginator(paginator)
|
||||
|
||||
watch(newItems, () => {
|
||||
emit('items', newItems.value)
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue