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

RadioButton: RadioButton 'checked' property and Native Input 'checked' Values Not Aligned with :modelValue #5694

Open
zagushka opened this issue May 7, 2024 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@zagushka
Copy link

zagushka commented May 7, 2024

Describe the bug

Bug Description

The RadioButton component exhibits a synchronization issue between its checked property and the native input's checked attribute when used with the :modelValue prop.
Despite setting the checked value based on the modelValue, input's checked value may change if the modelValue remains unchanged.
This discrepancy results in the @update:model-value event not firing upon clicking the same RadioButton for the second time.
To highlight the issue, I removed CSS styling to visually display both the RadioButton wrapper and its native input on stackblitz example.

I believe this was introduced during the refactoring of the RadioButton component.

Reproducer

https://stackblitz.com/edit/primevue-create-vue-issue-template-jql41c?file=src%2FApp.vue

PrimeVue version

3.52.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Nuxt

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

I would expect the native input's 'checked' state to match the value of the ':modelView' prop.

@zagushka zagushka added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant