Skip to content

Update modal.vue #142

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

Merged
merged 2 commits into from
Mar 13, 2017
Merged

Update modal.vue #142

merged 2 commits into from
Mar 13, 2017

Conversation

mosinve
Copy link
Member

@mosinve mosinve commented Mar 13, 2017

Add .bind(this) to hub.$on event listeners because without this modification at the moment of receving event "this" points to root element instead of current.

If I'm wrong, tell me how to use modal without his mod, pls :)

Add .bind(this) to hub.$on event listeners because without this modification at the moment of receving event "this" points to root element instead of current.
@@ -110,8 +110,8 @@ export default {
},
created() {
const hub = this.$root;
Copy link
Member

@pi0 pi0 Mar 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can use self trick :)) Something like this:

 const self=this;
 hub.$on('show::modal', id => id === self.id && self.show());
``

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but it's the same as usind .bind(this) and with extra var

Methods taken from standalone dropdown component to add clickout-hide action.
@pi0
Copy link
Member

pi0 commented Mar 13, 2017

@mosinve Thanks for your contribution :) please say when your work was done on this component and i will merge it soon :)

@mosinve
Copy link
Member Author

mosinve commented Mar 13, 2017

It' works now) at least at this point))) so you can merge )
Somehow another commit on dropdown added to this PR....

@pi0 pi0 merged commit addd10e into bootstrap-vue:master Mar 13, 2017
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

Successfully merging this pull request may close these issues.

2 participants