Skip to content

Commit

Permalink
fix(filter): avoid unnecessary deep proxy
Browse files Browse the repository at this point in the history
fixes #20849
  • Loading branch information
KaelWD committed Jan 15, 2025
1 parent 7463ccf commit 933bf24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vuetify/src/composables/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-disable no-labels */

// Utilities
import { computed, ref, unref, watchEffect } from 'vue'
import { computed, shallowRef, unref, watchEffect } from 'vue'
import { getPropertyFromItem, propsFactory, wrapInArray } from '@/util'

// Types
Expand Down Expand Up @@ -139,8 +139,8 @@ export function useFilter <T extends InternalItem> (
customKeyFilter?: MaybeRef<FilterKeyFunctions | undefined>
}
) {
const filteredItems: Ref<T[]> = ref([])
const filteredMatches: Ref<Map<unknown, Record<string, FilterMatch>>> = ref(new Map())
const filteredItems: Ref<T[]> = shallowRef([])
const filteredMatches: Ref<Map<unknown, Record<string, FilterMatch>>> = shallowRef(new Map())
const transformedItems = computed(() => (
options?.transform
? unref(items).map(item => ([item, options.transform!(item)] as const))
Expand Down

0 comments on commit 933bf24

Please sign in to comment.