Skip to content

Commit 9e064da

Browse files
committed
fix: undo not triggering change on init
1 parent 8a7f3b3 commit 9e064da

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/composables/useValue.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { toRefs, ref, computed, onMounted } from 'vue'
1+
import { toRefs, computed } from 'vue'
22

33
export default function useValue (props, context, dependencies)
44
{
@@ -7,10 +7,6 @@ export default function useValue (props, context, dependencies)
77
/* istanbul ignore next */
88
const externalValue = modelValue && modelValue.value !== undefined ? modelValue : value
99

10-
// ================ DATA ================
11-
12-
const mounted = ref(false)
13-
1410
// ============== COMPUTED ==============
1511

1612
const checked = computed(() => {
@@ -21,10 +17,6 @@ export default function useValue (props, context, dependencies)
2117

2218
// no export
2319
const update = (val) => {
24-
if (!mounted.value) {
25-
return
26-
}
27-
2820
context.emit('input', val)
2921
context.emit('update:modelValue', val)
3022
context.emit('change', val)
@@ -60,10 +52,6 @@ export default function useValue (props, context, dependencies)
6052
check()
6153
}
6254

63-
onMounted(() => {
64-
mounted.value = true
65-
})
66-
6755
return {
6856
externalValue,
6957
checked,

0 commit comments

Comments
 (0)