File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
packages/vuetify/src/composables Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 11// Utilities
2- import { computed , ref , watch } from 'vue'
2+ import { computed , ref , toRaw , watch } from 'vue'
33import { getCurrentInstance , toKebabCase } from '@/util'
44import { useToggleScope } from '@/composables/toggleScope'
55
@@ -46,14 +46,12 @@ export function useProxiedModel<
4646
4747 const model = computed ( {
4848 get ( ) : any {
49- return transformIn ( isControlled . value ? props [ prop ] : internal . value )
49+ return transformIn ( toRaw ( isControlled . value ? props [ prop ] : internal . value ) )
5050 } ,
51- set ( value ) {
52- const newValue = transformOut ( value )
53- if (
54- ( isControlled . value ? props [ prop ] : internal . value ) === newValue ||
55- transformIn ( isControlled . value ? props [ prop ] : internal . value ) === value
56- ) {
51+ set ( internalValue ) {
52+ const newValue = transformOut ( internalValue )
53+ const value = toRaw ( isControlled . value ? props [ prop ] : internal . value )
54+ if ( value === newValue || transformIn ( value ) === internalValue ) {
5755 return
5856 }
5957 internal . value = newValue
You can’t perform that action at this time.
0 commit comments