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

Switch component misbehaving inside TabView/TabPanel #1223

Closed
psuplat opened this issue Apr 29, 2021 · 2 comments
Closed

Switch component misbehaving inside TabView/TabPanel #1223

psuplat opened this issue Apr 29, 2021 · 2 comments

Comments

@psuplat
Copy link

psuplat commented Apr 29, 2021

Not sure if this is a bug or just me missing something.

Vue version: 2.6.11
PrimeVue version: 2.4.1

The switches are not working as expected inside a TabView. Take this setup:

<TabView>
    <TabPanel header="Tab1">
        <InputSwitch v-model="sw1" />
    </TabPanel>
    <TabPanel header="Tab2">
	<InputSwitch v-model="sw2" />
    </TabPanel>
    <TabPanel header="Tab3">
	<InputSwitch v-model="sw3" />
    </TabPanel>
</TabView>
data() {
    return {
        sw1: false,
        sw2: false,
        sw3: false
    }
}

For example in I toggle the switch inside Tab1, I can see in the vue dev tools that the value of sw1 has been changed to true. However the switch stays in it's original "off" mode. Only when I move to any of the other tabs, and then back to Tab1, is the switch component correctly represented. Exactly the same way happens other way around, when toggling off the switch, sw1 gets modified to false, but the switch stays "on" until I change tabs.

Am I missing something here?

@sid-6581
Copy link
Contributor

sid-6581 commented May 3, 2021

We are seeing the same thing. Seems that 2.4.1 is broken in several areas (including this), and reverting to 2.3.0 fixed the problem for now. Hopefully this can be addressed. I've seen a number of bug reports related to this, but no response.

@cagataycivici cagataycivici added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working priority - medium labels May 10, 2021
@cagataycivici cagataycivici added this to the 2.4.2 milestone May 10, 2021
@tugcekucukoglu
Copy link
Member

Duplicate #1209

@tugcekucukoglu tugcekucukoglu removed this from the 2.4.2 milestone May 31, 2021
@tugcekucukoglu tugcekucukoglu removed Type: Bug Issue contains a bug related to a specific component. Something about the component is not working priority - medium vue2 labels May 31, 2021
@tugcekucukoglu tugcekucukoglu removed their assignment May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants