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

bug: ionic vue tab change events not firing #22466

Closed
Calvin1121 opened this issue Nov 10, 2020 · 6 comments · Fixed by #22479
Closed

bug: ionic vue tab change events not firing #22466

Calvin1121 opened this issue Nov 10, 2020 · 6 comments · Fixed by #22479
Labels
package: vue @ionic/vue package type: bug a confirmed bug report
Milestone

Comments

@Calvin1121
Copy link

Calvin1121 commented Nov 10, 2020

Bug Report

Ionic version:

[ ] 4.x
[x] 5.x

Current behavior:

Expected behavior:

Steps to reproduce:

Related code:

insert short code snippets here

image
I wanna get the selected tab when the tabs changed, so i used the event 'ionTabsDidChange' to listen the value of tab, but it doesn't work. And I hope get the value by 'getSelected' like the method what i coded on Angular.
image
So anyone can help me to solve it. I'm just new in Ionic-vue. And the documentation of vue doesn't make it clear.

Other information:

Ionic info:

insert the output from ionic info here
@ionitron-bot ionitron-bot bot added the triage label Nov 10, 2020
@liamdebeasi liamdebeasi added package: vue @ionic/vue package type: bug a confirmed bug report labels Nov 10, 2020
@ionitron-bot ionitron-bot bot removed the triage label Nov 10, 2020
@liamdebeasi liamdebeasi changed the title bug: the function of tabs doesn't work bug: ionic vue tab change events not firing Nov 10, 2020
@liamdebeasi
Copy link
Contributor

Thanks for the issue. You are doing things correctly in Ionic Vue, there is just a bug where the event is not firing. I will work on a fix for this.

@liamdebeasi liamdebeasi added this to the 5.5.0 milestone Nov 10, 2020
@Calvin1121
Copy link
Author

Hello @liamdebeasi, There is still a questin that how can I use the method 'getSelected' in vue. Should I use the property 'ref' to get it? Thx a lot.

@liamdebeasi
Copy link
Contributor

I don't think IonTabs has that method exposed. I can address in a separate PR. Once that is in, yes you would use a ref on IonTabs to access it.

Here is a dev build if you want to test the fix for the change events:

npm install @ionic/vue@5.5.0-dev.202011111859.6ee38a2 @ionic/vue-router@5.5.0-dev.202011111859.6ee38a2

@Calvin1121
Copy link
Author

Thx a lot. The event is firing now. And I'm sure there is method exposed, and I just kenew it can be accessed by 'ViewChild' in Angular. BUt I have no idea about it in Vue.

@liamdebeasi liamdebeasi modified the milestones: 5.5.0, 5.5.1 Nov 16, 2020
@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #22479, and a fix will be available in an upcoming release of Ionic Framework.

@ionitron-bot
Copy link

ionitron-bot bot commented Dec 31, 2020

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Dec 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: vue @ionic/vue package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants