fix: usar rows en lugar de data y key en lugar de accessorKey para UTable
This commit is contained in:
@@ -138,7 +138,7 @@
|
|||||||
|
|
||||||
<!-- Table -->
|
<!-- Table -->
|
||||||
<UTable
|
<UTable
|
||||||
:data="paginatedData"
|
:rows="paginatedData"
|
||||||
:columns="displayColumns"
|
:columns="displayColumns"
|
||||||
:loading="loadingData"
|
:loading="loadingData"
|
||||||
/>
|
/>
|
||||||
@@ -263,13 +263,8 @@ const displayColumns = computed(() => {
|
|||||||
const filtered = tableColumns.value
|
const filtered = tableColumns.value
|
||||||
.filter(col => visibleColumns.value.includes(col.key))
|
.filter(col => visibleColumns.value.includes(col.key))
|
||||||
.map(col => ({
|
.map(col => ({
|
||||||
accessorKey: col.key,
|
key: col.key,
|
||||||
header: col.label,
|
label: col.label
|
||||||
cell: ({ row }: any) => {
|
|
||||||
const value = row.getValue(col.key)
|
|
||||||
if (value === null || value === undefined) return '-'
|
|
||||||
return String(value)
|
|
||||||
}
|
|
||||||
}))
|
}))
|
||||||
console.log('📊 displayColumns computed:', filtered.length, 'visible columns')
|
console.log('📊 displayColumns computed:', filtered.length, 'visible columns')
|
||||||
return filtered
|
return filtered
|
||||||
|
|||||||
Reference in New Issue
Block a user