mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-17 21:48:07 +01:00
fix(Table): proxy props without useForwardProps
https://github.com/nuxt/ui/issues/3255#issuecomment-2640503829
This commit is contained in:
@@ -161,7 +161,7 @@ export type TableSlots<T> = {
|
||||
|
||||
<script setup lang="ts" generic="T extends TableData">
|
||||
import { computed } from 'vue'
|
||||
import { Primitive, useForwardProps } from 'reka-ui'
|
||||
import { Primitive } from 'reka-ui'
|
||||
import { upperFirst } from 'scule'
|
||||
import { FlexRender, getCoreRowModel, getFilteredRowModel, getSortedRowModel, getExpandedRowModel, useVueTable } from '@tanstack/vue-table'
|
||||
import { reactiveOmit } from '@vueuse/core'
|
||||
@@ -196,10 +196,8 @@ const groupingState = defineModel<GroupingState>('grouping', { default: [] })
|
||||
const expandedState = defineModel<ExpandedState>('expanded', { default: {} })
|
||||
const paginationState = defineModel<PaginationState>('pagination', { default: {} })
|
||||
|
||||
const tableProps = useForwardProps(reactiveOmit(props, 'as', 'data', 'columns', 'caption', 'sticky', 'loading', 'loadingColor', 'loadingAnimation', 'class', 'ui'))
|
||||
|
||||
const tableApi = useVueTable({
|
||||
...tableProps,
|
||||
...reactiveOmit(props, 'as', 'data', 'columns', 'caption', 'sticky', 'loading', 'loadingColor', 'loadingAnimation', 'class', 'ui'),
|
||||
data,
|
||||
columns: columns.value,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
|
||||
Reference in New Issue
Block a user