Skip to content
Discussion options

You must be logged in to vote

In my project I have a different approach:

<template>
  <v-data-table-server :v-model:options="options" @update:options="load" />
</template>

<script setup>
const options = ref({
    page: 1,
    itemsPerPage: 10
})

async function load({ page, itemsPerPage, sortBy }) {
    // api call
}

async function refresh() {    
  await load(options.value)
}
</script>

Replies: 5 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ilyen85
Comment options

Comment options

You must be logged in to vote
2 replies
@ilyen85
Comment options

@Mmarin95
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by christianholland
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants