Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InputMask components fires @update:modelValue although value not changed #6868

Closed
erhansaydam opened this issue Nov 26, 2024 · 1 comment · Fixed by #6886
Closed

InputMask components fires @update:modelValue although value not changed #6868

erhansaydam opened this issue Nov 26, 2024 · 1 comment · Fixed by #6886
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@erhansaydam
Copy link

erhansaydam commented Nov 26, 2024

Describe the bug

InputMask component fires @update:modelValue function everytime by clicking inside and outside the input even when the value was not changed.

Simple code is as follows:

<template>
    <div class="card flex justify-content-center">
        <InputMask id="basic" v-model="value" mask="99-999999" placeholder="99-999999" 
                            @update:modelValue="handleInput" />
    </div>
</template>

<script setup>
import { ref } from 'vue';
const value = ref(null);
function handleInput(){
    console.log('value updated')
}
</script>

Reproducer

https://stackblitz.com/edit/mkk2dr?file=src%2FApp.vue

PrimeVue version

3.53.0

Vue version

3.x

Language

ES6

Build / Runtime

Vite

Browser(s)

Chrome 115

Steps to reproduce the behavior

The sample code is in the description.
Click on the input's inside.
Don't change the value
Click outside the input.
Bug: handleInput function executes, (i.e. @update:ModelValue is triggered.)

Expected behavior

Click on the input's inside.
Don't change the value
Click outside the input.
handleInput function must not execute, (i.e. @update:ModelValue must not be triggered.)

@erhansaydam erhansaydam added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 26, 2024
@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team Resolution: Help Wanted Issue or pull request requires extra help and feedback and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Status: Pending Review Issue or pull request is being reviewed by Core Team labels Nov 26, 2024
@mertsincan mertsincan added this to the Future milestone Nov 26, 2024
Copy link

Due to PrimeVue team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨

@tugcekucukoglu tugcekucukoglu modified the milestones: Future, 4.2.5 Nov 29, 2024
@tugcekucukoglu tugcekucukoglu added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Nov 29, 2024
@tugcekucukoglu tugcekucukoglu self-assigned this Nov 29, 2024
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Resolution: Help Wanted Issue or pull request requires extra help and feedback Status: Pending Review Issue or pull request is being reviewed by Core Team labels Nov 29, 2024
@github-project-automation github-project-automation bot moved this to Done in PrimeVue Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants