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] don't support dynamic update #194

Closed
mosinve opened this issue Mar 31, 2017 · 7 comments
Closed

[Tabs] don't support dynamic update #194

mosinve opened this issue Mar 31, 2017 · 7 comments

Comments

@mosinve
Copy link
Member

mosinve commented Mar 31, 2017

Figured that our implementation of Tabs works only when tab-items hardcoded in template.
In my project I need to build tabs in a modal dialog according to what dialog is opened. So i need to update tab-items when modal opens.
Spent all day to find solution, thought moving tabs init routine from mounted() to updated() will solve problem.. at playground it worked, but my proj hangs on opening...
So i'm in need of some help ))

@pi0
Copy link
Member

pi0 commented Mar 31, 2017

Hi vitaly :) I was exactly thinking of that after your last commit :))

First for easier and faster debugging you can use yarn link feature. (register local clone with yarn link and on real project link it with yarn link bootstrap-vue) Then each time you trigger yarn build on bootstrap-vue package all changes will be reflected to that project too.

As a first attempt we can move mounted logic to a method like updateTabs() and just calling that on mounted too. this way we can at least manually call this method more times for example when children are changed for any reason.

@pi0
Copy link
Member

pi0 commented Mar 31, 2017

For making this automatic i think Vue had an special even for child change notifications we can listen and call updateTabs on that event.

@mosinve
Copy link
Member Author

mosinve commented Mar 31, 2017

Hmm... worth to try, thanks)
I already started to look towards scoped slots )))
here some draft - https://jsfiddle.net/cihkem/uqdvksre/

@mosinve
Copy link
Member Author

mosinve commented Apr 1, 2017

first approach seems to work )))
And i spend time to deal this webpack/babel symlink issue..... and don't solve it... problem that im on windows... :(

pi0 pushed a commit that referenced this issue Apr 3, 2017
@pi0
Copy link
Member

pi0 commented Apr 3, 2017

@mosinve Tabs are now automatically updated without need to any function call :) Please just check example at 0.11.1 (things may be cached, if so you can try it on playground too)

@pi0
Copy link
Member

pi0 commented Apr 7, 2017

@mosinve Is this issue resolved now?

@mosinve
Copy link
Member Author

mosinve commented Apr 7, 2017

oh, forgot to close issue:)
Yeah, tabs works good.
Closing...

@mosinve mosinve closed this as completed Apr 7, 2017
@pi0 pi0 added this to Done in Roadmap Apr 7, 2017
@pi0 pi0 removed this from Done in Roadmap Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants