fix(data-table): change reactive data to shallowRef

This commit is contained in:
romanhrynevych 2024-08-31 10:14:46 +03:00
parent 6d4ed04cd2
commit ae4d5aa134
2 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ import {
} from '@tanstack/vue-table' } from '@tanstack/vue-table'
import { ArrowUpDown, ChevronDown } from 'lucide-vue-next' import { ArrowUpDown, ChevronDown } from 'lucide-vue-next'
import { h, ref } from 'vue' import { h, ref, shallowRef } from 'vue'
import DropdownAction from './DataTableDemoColumn.vue' import DropdownAction from './DataTableDemoColumn.vue'
import { Button } from '@/lib/registry/default/ui/button' import { Button } from '@/lib/registry/default/ui/button'
import { Checkbox } from '@/lib/registry/default/ui/checkbox' import { Checkbox } from '@/lib/registry/default/ui/checkbox'
@ -45,7 +45,7 @@ export interface Payment {
email: string email: string
} }
const data = ref<Payment[]>([ const data = shallowRef<Payment[]>([
{ {
id: 'm5gr84i9', id: 'm5gr84i9',
amount: 316, amount: 316,

View File

@ -17,7 +17,7 @@ import {
} from '@tanstack/vue-table' } from '@tanstack/vue-table'
import { ArrowUpDown, ChevronDown } from 'lucide-vue-next' import { ArrowUpDown, ChevronDown } from 'lucide-vue-next'
import { h, ref } from 'vue' import { h, ref, shallowRef } from 'vue'
import DropdownAction from './DataTableDemoColumn.vue' import DropdownAction from './DataTableDemoColumn.vue'
import { Button } from '@/lib/registry/new-york/ui/button' import { Button } from '@/lib/registry/new-york/ui/button'
import { Checkbox } from '@/lib/registry/new-york/ui/checkbox' import { Checkbox } from '@/lib/registry/new-york/ui/checkbox'
@ -45,7 +45,7 @@ export interface Payment {
email: string email: string
} }
const data = ref<Payment[]>([ const data = shallowRef<Payment[]>([
{ {
id: 'm5gr84i9', id: 'm5gr84i9',
amount: 316, amount: 316,