Open jhomlala opened 11 months ago
Hey @jhomlala
Thanks for your observation. The idea is that, when using the router, you intend for it to seamlessly manage and control this specific kind of behavior.
@erikhaandrikman, please confirm on this.
@sandeep-vedam Thanks for your answer. Still, it will be great if developers would have a possibility to enable this or not. Right now we can't change this behavior and we need to override once again _handleBack
variable.
Also it would be useful if Router documentation will have this scenario explained. I couldn't find anything related to this behavior in docs page.
Hi, I've found interesting issue.
_handleBack
is not getting called in component which extendsRouter.App
.I've looked into router code and I've found that this is caused by this line: https://github.com/rdkcentral/Lightning-SDK/blob/8a841d7b525503c9ba1d6212470727943710d420/src/Router/utils/router.js#L167
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:
Thanks for your help!