diff --git a/docs/components/content/examples/TableExampleAdvanced.vue b/docs/components/content/examples/TableExampleAdvanced.vue index b5758963..a99b501f 100644 --- a/docs/components/content/examples/TableExampleAdvanced.vue +++ b/docs/components/content/examples/TableExampleAdvanced.vue @@ -77,6 +77,7 @@ const resetFilters = () => { } // Pagination +const sort = ref({ column: 'id', direction: 'asc' as const }) const page = ref(1) const pageCount = ref(10) const pageTotal = ref(200) // This value should be dynamic coming from the API @@ -92,11 +93,13 @@ const { data: todos, pending } = await useLazyAsyncData<{ query: { q: search.value, '_page': page.value, - '_limit': pageCount.value + '_limit': pageCount.value, + '_sort': sort.value.column, + '_order': sort.value.direction } }), { default: () => [], - watch: [page, search, searchStatus, pageCount] + watch: [page, search, searchStatus, pageCount, sort] }) @@ -175,11 +178,13 @@ const { data: todos, pending } = await useLazyAsyncData<{