Skip to content

ToggleSwitch and ToggleButton not respecting modelValue state while in controlled mode #7871

@manot40

Description

@manot40

I have this issue as well, the ToggleSwitch is an uncontrolled component and does not listen to its modelValue, which is bad practice

Originally posted by @stam in #6961

Here is the updated stackblitz repro with Primevue v4 and Vue + Vite.

Try clicking the element. The model ref stay false while the component changed into checked state, which supposedly to stay unchecked and consistent to provided modelValue state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Pending ReviewIssue or pull request is being reviewed by Core Team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions