SAP / ui5-typescript

Tooling to enable TypeScript support in SAPUI5/OpenUI5 projects
https://sap.github.io/ui5-typescript
Apache License 2.0
200 stars 28 forks source link

ShellUIService: setBackNavigation implementation never called #395

Closed Pascal-SV closed 1 year ago

Pascal-SV commented 1 year ago

Hi,

I would like to implement the central back button functionality on the Fiori Shell. For this purpose, I followed the documentation and added

"services": { "ShellUIService": { "factoryName": "sap.ushell.ui5service.ShellUIService" } },

to the manifest. In the onInit function of my controller I am calling

this.getOwnerComponent().getService('ShellUIService').then( (oShellService) => { oShellService.setBackNavigation(function () { // call our generic cancel function this.proceedCancellation(); }); }, );

Unfortunately, the function passed to setBackNavigation is never called when navigating back using the button.

Expected behavior My code is being called when central back button is pressed.

Additional context SAPUI5 version 1.108.7

Pascal-SV commented 1 year ago

.