-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Issue 549 #571
Issue 549 #571
Conversation
Hey, thanks for opening this PR! I'm not overly familiar with the codebase anymore, but from what I've gathered from a quick skimming, could you try the following in https://github.com/matestack/matestack-ui-core/blob/19b5b8c97ee551d8d2f80840aa2d1c16a5727e9e/lib/matestack/ui/vue_js/components/toggle.js ? Put this code snippet from the if(this.props["hide_after"] != undefined){
self.hide_after_timeout = setTimeout(function () {
self.hide()
}, parseInt(this.props["hide_after"]));
} into the Also, line 46-48 of this component can be safely deleted from my POV since they already get covered in line 37-38 |
Elaboration: The way I read the issue, the |
@pascalwengerter Wow thanks for commenting so quickly! I tried out your solution with no success last night, but I do think it's close. I tried a few other things based on your solution with again, no success, but I will keep trying. Thanks again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I need to setup Ruby/Rails/matestack on my machine as well to get my hands dirty on this 👨🏽🔬 just some quick review of your changes since I got the notification
@@ -39,6 +39,11 @@ const componentDef = { | |||
hide: function(){ | |||
this.showing = false | |||
this.event.data = {} | |||
if(this.props["hide_after"] != undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you'll have to touch this component though, the hide
method is already called in a timeout in line 35 if hide_after
is defined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this component does not need to be touched. The hide things in the async
component should actually be deleted at some point...
@@ -7,7 +7,7 @@ const componentDef = { | |||
data: function(){ | |||
return { | |||
showing: true, | |||
hide_after_timeout: null, | |||
hideAfterTimeout: null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to rename this from my POV, but if you want to then please do so in the rest of the file as well ;)
Hey @meaagan @pascalwengerter! Sorry for my late reply on this one! And thanks a lot @meaagan for your PR! I agree with @pascalwengerter suggestion:
With the suggested addition of @pascalwengerter, a combination of |
Issue #549:
hide_after
should work withoutshow_on: 'event'
Hi! As you can see, this PR only consists of a bunch of console.logs and puts. I did this to show where I was looking for the bug/solution and to potentially get a hint on where to start. I was (obviously) unsuccessful, but I am hoping that I was looking at the correct lines or at least in the right files.
I understand that the issue comes from the mount as it says in the description of the bug (the lifecycle is never started, therefore the timer also never starts), but knowing that it comes from a vue.js file, I could not figure out what to do.