TriggersExit not firing again after "stop()"ped
See original GitHub issuethe titles sums it up - I’m unable to have my triggersExit function fire again, after it has been stopped.
this is my code
FlowRouter.route('/lobby/:id', {
name:'lobby',
action() {
BlazeLayout.render('default_layout', {content:'lobby'})
},
triggersExit:[(context, redirect, stop) => {
if(context.params.id
&& Lobbies.findOne({_id:context.params.id, state:{$ne:2}}))
if(!confirm(`The lobby isn't over.\n\n Are you sure you want to leave this page?`))
stop()
}]
})
The trigger is fired the first time I try to leave the route, but won’t trigger again before I navigate away from the route or refresh.
I’m not sure if this is a bug, or if I’m approaching this the wrong way 😃
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Prevent user from exiting a route · Issue #318
So we popup a modal with a confirm / cancel option. The problem now is that this requires a callback, so the triggersExit...
Read more >Sample records for daily average exit
Bacterial colonization patterns in daily chlorhexidine care at the exit site in peritoneal dialysis (PD) patients were not known. We performed a prospective ......
Read more >https://cgit.freedesktop.org/~dbn/pkg-config/plain...
622149 --disable-regex breaks glib2 build 639873 GBinding: Crash when binding two properties on the same... 640202 For GLIB v.
Read more >Control of the M/G1 and GI1/S phase - TSpace - University of Toronto
activates pre-replicative origin firing, prevents origin refiring and promotes mitotic events such as chromosome segregation. At the end of mitosis, ...
Read more >(Public Pack)Agenda Document for Cabinet, 01/02/2017 16:00
If a decision is not called-in, it will be implemented after the expiry of ... that the Government had committed to working with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I hope this can either be accepted as a bug or dismissed as a misunderstanding on my part 😃
I find it quite logical that triggersExit should run a 2nd time, if I
stop()
it the first time, and don’t navigate awayFixed relatively comprehensively here: https://github.com/kadirahq/flow-router/pull/681