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

Tabs within reused components #191

Open
manquer opened this issue Apr 18, 2017 · 2 comments
Open

Tabs within reused components #191

manquer opened this issue Apr 18, 2017 · 2 comments

Comments

@manquer
Copy link

manquer commented Apr 18, 2017

The addon suggests implementing tabs using ember routes , I have used this structure in last few projects without issue, However In the current one, I have use case where there is larger component within which tabs have to be shown.

The larger component is reused in multiple routes. using sub routes for each tab is cumbersome and error prone and is not in sync with self contained ember components . In this context (at least in my use case) the current state and history are not required, i.e. using ember routing and/or semantic tab routing are not necessary

Is there better ember way to do this ? or would you consider this as valid use case for a tab component ?

@aaronbhansen
Copy link
Contributor

The problem with using the actual tabs semantic plugin is it updates your routes. It would mess with embers routing. I'd suggest using query params or just tracking state on the page individually. Thats mainly why we don't recommend tabs is because you now have ember trying to update the routing and semantic.

@manquer
Copy link
Author

manquer commented Apr 18, 2017

thank you for the quick response, I had figured it was because of the routing you have not build component, I hoped there was a simple way to disable the semantic routing 😞

I will build a new component using menus and track the state internally on click trigger active states for different tabs. I guess while this works for me, the emulation cannot really be part of the official library and obviously it will not have all the features in the core module. Once I have usable version, I will post it here for anyone else looking for similar functionality

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

2 participants