Skip to content

Commit

Permalink
feat: add paginationRowModel to table defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhammadM1998 committed Jan 31, 2025
1 parent 93bca1f commit 674cb16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runtime/components/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export type TableSlots<T> = {
import { computed } from 'vue'
import { defu } from 'defu'
import { Primitive } from 'reka-ui'
import { FlexRender, getCoreRowModel, getFilteredRowModel, getSortedRowModel, getExpandedRowModel, useVueTable } from '@tanstack/vue-table'
import { FlexRender, getCoreRowModel, getFilteredRowModel, getSortedRowModel, getExpandedRowModel, getPaginationRowModel, useVueTable } from '@tanstack/vue-table'
import { upperFirst } from 'scule'
import { useLocale } from '../composables/useLocale'

Expand Down Expand Up @@ -125,6 +125,7 @@ const tableApi = useVueTable(defu(props.tanstackOptions, {
onSortingChange: (updaterOrValue: Updater<SortingState>) => valueUpdater(updaterOrValue, sortingState),
getExpandedRowModel: getExpandedRowModel(),
onExpandedChange: (updaterOrValue: Updater<ExpandedState>) => valueUpdater(updaterOrValue, expandedState),
getPaginationRowModel: getPaginationRowModel(),
state: {
get globalFilter() {
return globalFilterState.value
Expand Down

0 comments on commit 674cb16

Please sign in to comment.