-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add an onTabActive action #9
Comments
I had a specific use case, when a tab was clicked, I wanted to transition to another page. Basically I wanted a few routes to look like a tab control, but each tab was actually a route. Exposing this action would have allowed me to perform a transition on action. But I wasn't sure what other use this action would actually serve. I came to the conclusion that I could use the ember-href-to as the text of my tab and accomplish the same thing. Given that, without a more general use case, I have chosen not to implement this as well, but leave this comment for anyone else wishing to accomplish the same thing. |
I would love this to. |
Is every tab basically the same display, just different data? or is each tab a completely different layout? If each tab is exactly the same, you should use the page control version. You dont really need a tab control. The page control version uses one pane, not a pane for each tab, so your DOM is only in there once. I have a tab where there are three accounts. Each account is a tab, the layout of each tab pane is exactly the same, just different data. You can see below there is only one pane, and there is an You will also notice I included a If you are on 2.18 or better you can use
|
My issue is that the data is loaded after the pane in initially rendered. I need a method to trigger a re-render. I edited x-tab.js which solved my problem.
On the reports template I called x-tabs like this:
|
It looks like you are using the version before they were composable. Looking in the code I cant find that action anywhere on the master branch so when you upgrade you may have to do it another way. What version of ember are you using and what version of this addon? |
oops, my bad. |
If you are on a higher version of xtabs, you probably are on a higher version of ember and I think there is a different way to accomplish that. It doesnt appear that the onActiveTab action is still there. Im not sure why. Dont see a reason it couldnt be added back. |
I've upgraded ember-x-tabs to 1.0.5
I've put in a pull request with the above alteration |
Since the PR wasnt linked here, I tried looking it up in closed ones, didnt see anything. Was this merged and is this in the current release? Or do we need to make another PR? If so, I would wait til after it is converted to a V2 addon |
If would be nice to have an action exposed that would inform when and which tab became active.
The text was updated successfully, but these errors were encountered: