From ae4d5aa1343e47a33b598a4da7f78605334cdee0 Mon Sep 17 00:00:00 2001 From: romanhrynevych Date: Sat, 31 Aug 2024 10:14:46 +0300 Subject: [PATCH] fix(data-table): change `reactive` data to `shallowRef` --- .../lib/registry/default/example/DataTableReactiveDemo.vue | 4 ++-- .../lib/registry/new-york/example/DataTableReactiveDemo.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/www/src/lib/registry/default/example/DataTableReactiveDemo.vue b/apps/www/src/lib/registry/default/example/DataTableReactiveDemo.vue index 25e48381..b89847dc 100644 --- a/apps/www/src/lib/registry/default/example/DataTableReactiveDemo.vue +++ b/apps/www/src/lib/registry/default/example/DataTableReactiveDemo.vue @@ -17,7 +17,7 @@ import { } from '@tanstack/vue-table' import { ArrowUpDown, ChevronDown } from 'lucide-vue-next' -import { h, ref } from 'vue' +import { h, ref, shallowRef } from 'vue' import DropdownAction from './DataTableDemoColumn.vue' import { Button } from '@/lib/registry/default/ui/button' import { Checkbox } from '@/lib/registry/default/ui/checkbox' @@ -45,7 +45,7 @@ export interface Payment { email: string } -const data = ref([ +const data = shallowRef([ { id: 'm5gr84i9', amount: 316, diff --git a/apps/www/src/lib/registry/new-york/example/DataTableReactiveDemo.vue b/apps/www/src/lib/registry/new-york/example/DataTableReactiveDemo.vue index 8dd21a81..7c515105 100644 --- a/apps/www/src/lib/registry/new-york/example/DataTableReactiveDemo.vue +++ b/apps/www/src/lib/registry/new-york/example/DataTableReactiveDemo.vue @@ -17,7 +17,7 @@ import { } from '@tanstack/vue-table' import { ArrowUpDown, ChevronDown } from 'lucide-vue-next' -import { h, ref } from 'vue' +import { h, ref, shallowRef } from 'vue' import DropdownAction from './DataTableDemoColumn.vue' import { Button } from '@/lib/registry/new-york/ui/button' import { Checkbox } from '@/lib/registry/new-york/ui/checkbox' @@ -45,7 +45,7 @@ export interface Payment { email: string } -const data = ref([ +const data = shallowRef([ { id: 'm5gr84i9', amount: 316,