-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
Hi, I've found interesting issue. _handleBack
is not getting called in component which extends Router.App
.
export class App extends Router.App {
static _template() {
...
}
_setup() {
startRotuer(routes)
}
_handleBack() {
//This will be never called
}
}
I've looked into router code and I've found that this is caused by this line:
Lightning-SDK/src/Router/utils/router.js
Line 167 in 8a841d7
app._handleBack = e => { |
Is this expected that router will override _handleBack
? Shouldn't the app be able to decide whether it wants to navigate back or not?
In order to handle back navigation in our app component we had to fix it like this:
export class App extends Router.App {
static _template() {
...
}
_setup() {
startRotuer(routes)
app._handleBack = function () {
// Handle back here. Decide whether we should step back in navigation (pop) or do something else.
}
}
_handleBack() {
//This will be never called
}
}
Thanks for your help!
Metadata
Metadata
Assignees
Labels
No labels