@bagelink/vue 1.4.128 → 1.4.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ import { onMounted, watch, ref } from 'vue'
|
|
|
8
8
|
const props = defineProps<{
|
|
9
9
|
id?: string
|
|
10
10
|
label?: string
|
|
11
|
-
modelValue
|
|
11
|
+
modelValue?: string
|
|
12
12
|
placeholder?: string
|
|
13
13
|
excludeCountries?: string[]
|
|
14
14
|
onlyCountries?: string[]
|
|
@@ -18,7 +18,7 @@ const props = defineProps<{
|
|
|
18
18
|
|
|
19
19
|
const emit = defineEmits(['update:modelValue', 'blur', 'focus', 'keydown', 'input', 'paste'])
|
|
20
20
|
|
|
21
|
-
let phoneNumber = $ref(props.modelValue)
|
|
21
|
+
let phoneNumber = $ref(props.modelValue ?? '')
|
|
22
22
|
let search = $ref('')
|
|
23
23
|
let activeCountry = $ref<Country>()
|
|
24
24
|
const searchInput = $ref<InstanceType<typeof TextInput>>()
|
|
@@ -34,7 +34,7 @@ watch(() => phoneNumber, (newValue) => {
|
|
|
34
34
|
// Watch for changes to the modelValue prop
|
|
35
35
|
watch(() => props.modelValue, (newValue) => {
|
|
36
36
|
if (newValue !== phoneNumber) {
|
|
37
|
-
phoneNumber = newValue
|
|
37
|
+
phoneNumber = newValue ?? ''
|
|
38
38
|
}
|
|
39
39
|
})
|
|
40
40
|
|