Open cetincakiroglu opened 6 months ago
But when we focus on the input and enter a number we should see the prefix "+998" instead we see "+888". It's a different phone code
Hi,
This issue also happens in PrimeVue and PrimeReact. Because of that, we'll revisit and discuss this issue in 17.12.0 milestone next week with the team.
You can use InputGroup as a solution, since the prefix is meant to be static. More about InputGroup
<script setup>
import InputGroup from 'primevue/inputgroup'
import InputGroupAddon from 'primevue/inputgroupaddon'
import InputMask from 'primevue/inputmask'
import { ref } from 'vue';
const phoneNumber = ref('');
</script>
<template>
<InputGroup>
<InputGroupAddon>+998</InputGroupAddon>
<InputMask
v-model="phoneNumber"
mask="(99) 999-99-99"
placeholder="(xx) xxx-xx-xx"
/>
</InputGroup>
</template>
See discussion: https://github.com/orgs/primefaces/discussions/1202
Reproducer: https://stackblitz.com/edit/acnz1y?file=src%2Fapp%2Fdemo%2Finput-mask-basic-demo.html